fix system deps and upgrade pip/setuptools to resolve lxml and xmlsec… #198
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test and Deploy | |
on: | |
push: | |
branches: [ 'tue-master' ] | |
tags: [ '*' ] | |
pull_request: | |
branches: [ 'tue-master' ] | |
workflow_dispatch: | |
jobs: | |
deploy_assets: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/tue-master' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
version: 12 | |
- name: Install and generate frontend assets | |
run: | | |
npm install | |
node_modules/gulp/bin/gulp.js | |
node_modules/gulp/bin/gulp.js prod | |
deploy_docker_image: | |
runs-on: ubuntu-latest | |
needs: [ deploy_assets ] | |
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/tue-master' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
repository: ubcctlt/compair-app | |
tag_with_ref: true | |
- name: Trigger deploy | |
run: | | |
curl -X POST \ | |
--fail \ | |
-F token=${{ secrets.DEPLOYMENT_TOKEN }} \ | |
-F ref=tue-master \ | |
-F "variables[app__image__tag]=${GITHUB_REF##*/}" \ | |
-F "variables[worker__image__tag]=${GITHUB_REF##*/}" \ | |
https://repo.code.ubc.ca/api/v4/projects/366/trigger/pipeline | |
# TODO: add acceptance testing (would be easier with a slight rewrite to gulp/generate_index) |