Deploy #39
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: Deploy | |
on: | |
workflow_run: | |
branches: [master] | |
workflows: [Test] | |
types: | |
- completed | |
jobs: | |
deploy-gh-pages: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4.0.2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build | |
run: yarn workspace @kenrick95/c4-browser run build-gh-pages | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4.6.1 | |
with: | |
branch: gh-pages | |
folder: browser/dist | |
deploy-fly: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- run: flyctl deploy --remote-only |