Skip to content

Commit

Permalink
tried differnt workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ale9806 committed Feb 7, 2024
1 parent ce07d9a commit 360eb31
Showing 1 changed file with 37 additions and 19 deletions.
56 changes: 37 additions & 19 deletions .github/workflows/deploy-github.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,52 @@
name: GitHub Pages
name: Deploy docs

on:
workflow_dispatch:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-20.04
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v4
with:
node-version: '20'
cache: 'npm'
python-version: '3.x'

- name: Setup mdBook
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Install Hugo
run: npm install -g hugo
- name: Build
run: |
python docs-export/export.py
python docs-repo/build.py
- name: Install dependencies
run: npm install
- uses: actions/upload-pages-artifact@v1
with:
path: docs-repo/docs
deploy:
needs: build

- name: Check for linting errors
run: npm test
permissions:
pages: write
id-token: write

- name: Build production website
run: npm run build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 360eb31

Please sign in to comment.