Skip to content

Commit

Permalink
fix: change deploy workflow to GH Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
shamilsan committed Jul 12, 2023
1 parent 9da059c commit bda16e7
Showing 1 changed file with 28 additions and 9 deletions.
37 changes: 28 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
push:
branches: [master]

permissions:
contents: read
pages: write
id-token: write

jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -26,13 +31,27 @@ jobs:
- name: Build
run: yarn build

- name: Deploy
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
- name: Setup GitHub Pages
# if: github.event_name == 'push' FIXME: Uncomment after testing
uses: actions/configure-pages@v3

- name: Upload Pages artifact
# if: github.event_name == 'push' FIXME: Uncomment after testing
uses: actions/upload-pages-artifact@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
cname: wiki.gear-tech.io
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
path: build

- name: Deploy
# if: github.event_name == 'push' FIXME: Uncomment after testing
uses: actions/deploy-pages@v2

# - name: Deploy
# if: github.event_name == 'push'
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./build
# cname: wiki.gear-tech.io
# force_orphan: true
# user_name: 'github-actions[bot]'
# user_email: 'github-actions[bot]@users.noreply.github.com'

0 comments on commit bda16e7

Please sign in to comment.