-
Notifications
You must be signed in to change notification settings - Fork 0
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
Steve Davis
committed
Jan 5, 2024
1 parent
4f1b18f
commit 39a90bf
Showing
1 changed file
with
65 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,65 @@ | ||
name: build and deploy | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
|
||
env: | ||
NODE_VERSION: 20 | ||
|
||
jobs: | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# node-version: [14.x, 16.x, 18.x] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- run: npm install | ||
- run: npm run build:production | ||
|
||
deploy: | ||
needs: build | ||
name: deploy | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
# # Specify runner + deployment step | ||
# runs-on: ubuntu-latest | ||
steps: | ||
# - name: Fix permissions | ||
# run: | | ||
# chmod -c -R +rX "_site/" | while read line; do | ||
# echo "::warning title=Invalid file permissions automatically fixed::$line" | ||
# done | ||
- name: Upload Pages artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
|
||
# steps: | ||
# - uses: actions/checkout@v4 | ||
|
||
# - name: Deploy | ||
# uses: JamesIves/github-pages-deploy-action@4.1.4 | ||
# with: | ||
# branch: gh-pages | ||
# folder: dist | ||
# registry-url: 'https://registry.npmjs.org' | ||
# - name: Use Node.js ${{ matrix.node-version }} | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: ${{ matrix.node-version }} |