Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ptq124 committed Mar 18, 2024
1 parent c9a9ca4 commit f1d0d80
Showing 1 changed file with 12 additions and 31 deletions.
43 changes: 12 additions & 31 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,16 @@
name: github pages

on:
push:
branches:
- main
name: Build and Deploy
on: [push]
jobs:
build-deploy:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '12.x'

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install -D vuepress

- run: npm run build
- name: Checkout
uses: actions/checkout@main

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_ACTIONS_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: docs/.vuepress/dist
- name: Vuepress deploy
uses: jenkey2011/[email protected]
env:
ACCESS_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }}
BUILD_SCRIPT: yarn && yarn build
TARGET_BRANCH: gh-pages
BUILD_DIR: docs/.vuepress/dist

0 comments on commit f1d0d80

Please sign in to comment.