Merge pull request #91 from fyp711/master-spread #106
This file contains hidden or 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 and Deploy HAMi Website | |
| on: | |
| push: | |
| branches: ["master"] | |
| release: | |
| types: [created] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Build | |
| run: npm run build | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| name: github-pages | |
| path: ./build/ | |
| retention-days: 1 | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| pages: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to Github Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |