Skip to content

Commit

Permalink
Introduce matrix build.
Browse files Browse the repository at this point in the history
  • Loading branch information
SilasBerger committed Dec 31, 2023
1 parent 8ac17ac commit b8e1487
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ on:
branches:
- main
jobs:
deploy:
deploy_matrix:
runs-on: ubuntu-latest
strategy:
matrix:
site: [ teach ]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -20,7 +23,6 @@ jobs:
with:
node-version: '20.x'

# TODO: Check whether there's a yarn action to simplify this.
# TODO: Get site from matrix param.
- name: Yarn build
run: |
Expand All @@ -31,15 +33,15 @@ jobs:
else
npm i
fi
SITE=teach npm run build
SITE=${{ matrix.site }} npm run build
# TODO: Derive remote path from matrix param.
- name: RSync to webhost
uses: Burnett01/[email protected]
with:
switches: -avzr --delete
path: build/
remote_path: ~/sites/teach.silasberger.ch/
remote_path: ~/sites/${{ matrix.site }}.silasberger.ch/
remote_host: ${{ secrets.WEBHOST_SSH_HOSTNAME }}
remote_user: ${{ secrets.WEBHOST_SSH_USERNAME }}
remote_key: ${{ secrets.WEBHOST_SSH_PRIVATE_KEY }}

0 comments on commit b8e1487

Please sign in to comment.