Created
November 6, 2023 18:52
-
-
Save David7ce/fa32883de5e88ecc5319ffc6b6d8954d to your computer and use it in GitHub Desktop.
Deploy Digital Garden to GitHub Pages with this workflow
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: GH Pages | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [20.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- run: npm install | |
- run: npm run build --if-present | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_dir: ./dist | |
github_token: ${{ secrets.GH_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment