Skip to content

Commit

Permalink
[Misc] Fix GitHub actions deployment commands
Browse files Browse the repository at this point in the history
  • Loading branch information
yangshun committed Aug 6, 2023
1 parent b111c6e commit 233925e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,16 @@ jobs:
npm i
fi
npm run build
gh-release:
gh-pages-deploy:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "18.x"
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
- name: Release to GitHub Pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "gh-actions"
cd website
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
Expand All @@ -49,4 +44,7 @@ jobs:
else
npm i
fi
npm run deploy
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run deploy -- -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"deploy": "next build && touch out/.nojekyll && gh-pages -d out -m \"Deploy to GitHub Pages\" -t true"
"deploy": "next build && gh-pages -d out -m \"Deploy to GitHub Pages\" -t true"
},
"license": "MIT",
"dependencies": {
Expand Down

0 comments on commit 233925e

Please sign in to comment.