-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (54 loc) · 2.75 KB
/
github-travis.yml
File metadata and controls
64 lines (54 loc) · 2.75 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
name: Deploy to GitHub Pages
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- main
workflow_dispatch: # For manual trigger
permissions:
contents: write
jobs:
build:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
# https://docusaurus.io/docs/deployment#triggering-deployment-with-github-actions
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Install dependencies
run: npm install
- name: Download toolkit READMEs
run: |
wget https://github.com/project-SIMPLE/simple.toolchain/raw/refs/heads/2024-06/GAMA%20Plugin/README.md -O ${{ runner.temp }}/gaml.extension.unity.md
sed -i '1s/^/---\ntitle: Install GAMA Plugin\n---\n/' ${{ runner.temp }}/gaml.extension.unity.md
mv ${{ runner.temp }}/gaml.extension.unity.md $GITHUB_WORKSPACE/docs/Getting-started
#
wget https://github.com/project-SIMPLE/simple.toolchain/raw/refs/heads/2024-06/Unity%20Template/README.md -O ${{ runner.temp }}/simple.template.unity.md
sed -i '1s/^/---\ntitle: Install Unity Template\n---\n/' ${{ runner.temp }}/simple.template.unity.md
mv ${{ runner.temp }}/simple.template.unity.md $GITHUB_WORKSPACE/docs/Getting-started
- name: Download documentation.wiki
run: |
git clone https://github.com/project-SIMPLE/simple.toolchain.wiki.git ${{ runner.temp }}/wiki
mv ${{ runner.temp }}/wiki/Home.md ${{ runner.temp }}/wiki/01-Home.md
mv ${{ runner.temp }}/wiki/* $GITHUB_WORKSPACE/docs/Toolchain
- name: Build website
run: npm run build
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com