-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ac17ac
commit b8e1487
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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: | | ||
|
@@ -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 }} |