Skip to content

Commit

Permalink
ci: update to use official deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
Locietta committed Oct 1, 2023
1 parent b15d53a commit 2c110e2
Showing 1 changed file with 35 additions and 11 deletions.
46 changes: 35 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,45 @@ on:
workflow_dispatch:
# manual trigger

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

concurrency:
group: pages
cancel-in-progress: false

jobs:
Vitepress_build:
Build:
runs-on: ubuntu-latest
container: locietta/loia-dev-base:node
name: Vitepress Deploy
name: build
steps:
- uses: actions/checkout@main
- name: Setup and build
shell: sh
- name: Checkout
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Setup
uses: actions/configure-pages@v3
- name: Install Deps
run: pnpm i
- name: Build
run: |
pnpm i
pnpm build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
touch .vitepress/dist/.nojekyll
- name: Upload Page Artifact
uses: actions/upload-pages-artifact@v2

This comment has been minimized.

Copy link
@Locietta

Locietta Oct 1, 2023

Author Owner

Failed, due to actions/upload-pages-artifact#17...

Try alternative actions or include GNU tar.

This comment has been minimized.

Copy link
@Locietta

Locietta Oct 1, 2023

Author Owner

Fixed upstream~

with:
github_token: ${{secrets.GITHUB_TOKEN}}
publish_dir: .vitepress/dist
cname: ${{ secrets.CUSTOM_DOMAIN }}
path: .vitepress/dist

Deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: deploy
steps:
- id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 2c110e2

Please sign in to comment.