Merge pull request #9 from 2ndr9/update-node #78
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: github pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
- name: create dot env file | |
run: | | |
touch .env.production | |
echo "GATSBY_TRACKING_ID=${{secrets.GATSBY_TRACKING_ID}}" >> .env.production | |
- name: install and build | |
run: | | |
npm i --production | |
npm run build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: ./public | |
cname: 2ndr9.com |