Skip to content

Commit

Permalink
👷 ci(actions): remove old gh pages action
Browse files Browse the repository at this point in the history
  • Loading branch information
csc530 committed Dec 11, 2023
1 parent ac85ab9 commit 5684283
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 134 deletions.
86 changes: 0 additions & 86 deletions .github/workflows/branchless.yml

This file was deleted.

130 changes: 82 additions & 48 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,86 @@
name: Build, commit, and deploy documentation to GitHub Pages
# This is a basic workflow to help you get started with Actions

name: vuebulma docs CI

# Controls when the workflow will run
on:
push:
branches: ["main"]
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
# trigger deployment manually
workflow_dispatch:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
- "src/demos/**"
pull_request:
branches: [ "main" ]
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
- "src/demos/**"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
# fetch all commits to get last updated time or other git log info
fetch-depth: 0
submodules: true

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
# choose pnpm version to use
version: 7
# install deps with pnpm
run_install: true

- name: Setup Node.js
uses: actions/setup-node@v3
with:
# choose node.js version to use
node-version: 18
# cache deps for pnpm
cache: pnpm

# run build script
- name: Build VuePress site
run: pnpm docs:build

# please check out the docs of the workflow for more details
- name: Deploy to GitHub Pages branch
uses: peaceiris/actions-gh-pages@v3
# If you're changing the branch from main,
# also change the `main` in `refs/heads/main`
# below accordingly.
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/.vuepress/dist
build-and-deploy:
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- uses: actions/checkout@v4
with:
# fetch all commits to get last updated time or other git log info
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
# choose pnpm version to use
version: 8
# install deps with pnpm
run_install: true

- name: Setup Node.js
uses: actions/setup-node@v4
with:
# choose node.js version to use
node-version: 18
# cache deps for pnpm
cache: pnpm

# run build script
- name: Build VuePress site
run: "pnpm docs:build"

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: docs
path: docs/.vuepress/dist

- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: 'docs/.vuepress/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3

0 comments on commit 5684283

Please sign in to comment.