Merge pull request #18 from JHWelch/use-nvmrc #29
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: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: prod-deploy | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Archive production artifacts | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: dist | |
deploy: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: github-pages | |
url: 'https://games.wowellworld.com/' | |
steps: | |
- name: Deploy artifact to GitHub Pages | |
uses: actions/deploy-pages@v4 |