Skip to content

Commit

Permalink
Update pages.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Petalzu committed Apr 24, 2024
1 parent bf4b47b commit cec678c
Showing 1 changed file with 30 additions and 13 deletions.
43 changes: 30 additions & 13 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,39 @@
name: Pages

on: push
on:
push:
branches:
- main

jobs:
publish:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '18'
- uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache
restore-keys: |
${{ runner.OS }}-npm-cache
- run: npm install
# - run: npx hexo algolia
# env:
# HEXO_ALGOLIA_INDEXING_KEY: ${{ secrets.HEXO_ALGOLIA_INDEXING_KEY }}
- run: NODE_ENV=production npx hexo g
- uses: peaceiris/actions-gh-pages@v3
- run: npm run build
- uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
force_orphan: true
path: public
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: lzuoss.github.io
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit cec678c

Please sign in to comment.