-
-
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.
Added GH workflow to build-analyze and deploy the website
- Loading branch information
1 parent
51f6cc3
commit 50da156
Showing
1 changed file
with
73 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: website | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
paths: ['docs/www/**'] | ||
pull_request: | ||
branches: [master] | ||
types: [opened, synchronize] | ||
paths: ['docs/www/**'] | ||
schedule: | ||
- cron: '0 0 * * 1' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-analyze: | ||
defaults: | ||
run: | ||
working-directory: docs/www | ||
permissions: | ||
security-events: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout-repo | ||
uses: actions/checkout@v4 | ||
- name: setup-node | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
node-version: '20' | ||
cache-dependency-path: docs/www/package-lock.json | ||
- name: install-dependencies | ||
run: npm ci --no-audit --no-fund --omit=optional | ||
- name: setup-codeql | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: javascript-typescript | ||
- name: build | ||
run: npm run build | ||
- name: analyze | ||
uses: github/codeql-action/analyze@v3 | ||
- name: upload-artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build | ||
path: docs/www/build | ||
deploy: | ||
if: ${{ github.event_name == 'push' }} | ||
environment: | ||
name: ${{ github.workflow }} | ||
url: ${{ steps.deploy.outputs.page_url }} | ||
permissions: | ||
id-token: write | ||
pages: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: download-artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
path: build | ||
- name: setup-page | ||
uses: actions/configure-pages@v4 | ||
- name: upload-page | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: build | ||
- name: deploy-page | ||
id: deploy | ||
uses: actions/deploy-pages@v4 |