Created
September 25, 2023 20:16
-
-
Save FazioNico/10f11de9c46e80a344984e54a7c5b2d9 to your computer and use it in GitHub Desktop.
[For Students] Github Action that deploy to Github Pages
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 Github Page | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
# - run: npm test | |
- run: npm run deploy:github --if-present | |
env: | |
CI: true | |
# Deploy env | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
./.github/workflows/deploy-ghp.yml
package.json
: