Update Governance.vue #1693
Workflow file for this run
This file contains 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, build, and deploy | |
on: [push, pull_request] | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
env: | |
APP_NAME: aggregator | |
steps: | |
- if: github.ref != 'refs/heads/develop' | |
uses: actions/checkout@v2 | |
with: | |
ref: develop | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 100 | |
- if: github.ref != 'refs/heads/develop' | |
run: git branch develop origin/develop | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 14.x | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
- run: npm ci | |
- run: npm test | |
- run: npm run build -- --report | |
- run: cp ./dist/index.html ./dist/404.html | |
- name: Deploy to production | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/master' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: dist | |
cname: superhero.com | |
- uses: rlespinasse/github-slug-action@v3.x | |
- name: Deploy to stage | |
uses: easingthemes/ssh-deploy@v2.1.5 | |
if: github.event_name == 'push' | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.STAGE_PRIVATE_KEY }} | |
SOURCE: dist/ | |
REMOTE_HOST: z52da5wt.xyz | |
REMOTE_USER: root | |
REMOTE_PORT: 2022 | |
TARGET: ${{ format('/data/{0}/{1}', env.APP_NAME, env.GITHUB_REF_SLUG_URL) }} | |
- uses: unsplash/comment-on-pr@85a56be792d927ac4bfa2f4326607d38e80e6e60 | |
if: github.event_name == 'pull_request' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
HOST: ${{ format('{0}.{1}.z52da5wt.xyz', env.GITHUB_HEAD_REF_SLUG_URL, env.APP_NAME) }} | |
with: | |
msg: Deployed to [${{ env.HOST }}](https://${{ env.HOST }}), [bundle report](https://${{ env.HOST }}/report.html) | |
check_for_duplicate_msg: true |