Created
January 26, 2023 14:58
-
-
Save dcortesnet/78613cf358d40161be056e18a234eac8 to your computer and use it in GitHub Desktop.
Github action Gatsby deploy
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: Deploy to Github pages | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Set-up Node | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: "14.x" | |
| - run: npm install | |
| - run: npm run build | |
| - name: Deploy | |
| uses: crazy-max/ghaction-github-pages@v1 | |
| with: | |
| target_branch: gh-pages | |
| build_dir: public | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment