Skip to content

fix: google ads plugin add ampproject framework. #27

fix: google ads plugin add ampproject framework.

fix: google ads plugin add ampproject framework. #27

Workflow file for this run

name: SumyBlog site to Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
TZ: Asia/Shanghai
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- uses: pnpm/action-setup@v2 # pnpm is optional but recommended, you can also use npm / yarn
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build with Rspress
run: |
pnpm run build:blog
- name: Archive files
run: zip -qq -r sumyblog.zip ./blog/doc_build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: sumyblog-artifact
path: ./sumyblog.zip
if-no-files-found: error
# Deployment job
deploy:
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: sumyblog-artifact
- name: Unzip artifact
run: unzip -qq sumyblog.zip -d ./
- name: Commit files
run: |
cd ./blog/doc_build
git init
git remote add origin [email protected]:sumy7/sumy7.github.io.git
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git branch -m main
git add .
git commit -a -m "site updated: $(date -u '+%Y-%m-%d %H:%M:%S')"
- name: Push Docs
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.DEPLOY_TOKENS }}
repository: sumy7/sumy7.github.io
branch: main
directory: ./blog/doc_build
force: true