forked from GregTechCEu/GregTech-Modern
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1 KB
/
deploy-pages.yml
File metadata and controls
38 lines (35 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Publish docs via GitHub Pages
on:
workflow_dispatch:
push:
branches: ["1.20.1", "1.21"]
paths: ['docs/**']
permissions:
contents: write
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
build:
name: build docs
runs-on: ubuntu-latest
defaults:
run:
working-directory: './docs'
steps:
- uses: actions/checkout@v4
with:
ref: '${{ github.ref_name }}'
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: Install packages
run: pip install -r ./requirements.txt
- name: Set git username and password
run: git config user.name 'github-actions[bot]'; git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Deploy pages to gh-pages branch
run: mike deploy "${{ github.ref_name }}" --push
- name: Ensure 1.20.1 is the default version
run: mike set-default 1.20.1 --push