Update build-test-deploy.yml #3
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: build-test-deploy | ||
on: push | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
- name: use node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
- run: npm install | ||
- run: npm run build | ||
test: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
- name: use node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
- run: npm install | ||
- run: npm test | ||
deploy: | ||
needs: test | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: production | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout rep | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secret.GITHUB_TOKEN }} | ||
Check failure on line 50 in .github/workflows/build-test-deploy.yml
|
||
- name: use node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
- name: configure github pages | ||
uses: actions/configure-pages@v4 | ||
with: | ||
static_site_generator: text | ||
- run: npm isntall | ||
- run: npm run build | ||
- name: upload artifacts | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: './out' | ||
- name: deploy | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||