mirror of
https://github.com/clearlinux/clear-linux-documentation.git
synced 2026-04-28 11:03:58 +00:00
GitHub Actions Support (#1043)
* Adding GitHub workflow for checking PRs. Signed-off-by: Kevin Putnam <kevin.putnam@intel.com> * Added carriage return to end of document. Signed-off-by: Kevin Putnam <kevin.putnam@intel.com> * Adds build on push to master deploying to developmentHTML branch. Adds build on push to publish deploying to latestHTML branch. Signed-off-by: Kevin Putnam <kevin.putnam@intel.com> * Uncomment publish URL. Signed-off-by: Kevin Putnam <kevin.putnam@intel.com> * Renamed Travis CI/CD file to avoid running it. Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>
This commit is contained in:
23
.github/workflows/check.yml
vendored
Normal file
23
.github/workflows/check.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Check
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
sudo apt-get install -y python3-setuptools
|
||||
pip3 install --user -r requirements.txt
|
||||
- name: Build the docs
|
||||
run: |
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
make py
|
||||
make htmlall
|
||||
|
||||
39
.github/workflows/main.yml
vendored
Normal file
39
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
sudo apt-get install -y python3-setuptools
|
||||
pip3 install --user -r requirements.txt
|
||||
- name: Build the docs
|
||||
run: |
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
make py
|
||||
make htmlall
|
||||
- name: Pre-deploy
|
||||
run: |
|
||||
wget https://github.com/clearlinux/clear-linux-documentation-zh-CN/releases/latest/download/clearlinux-docs-zh-CN.tar.gz
|
||||
mkdir source/_build/html/zh_CN
|
||||
tar xvzf clearlinux-docs-zh-CN.tar.gz -C source/_build/html/zh_CN
|
||||
mv source/_build/html $HOME/output
|
||||
- name: Deploy the docs
|
||||
run: |
|
||||
cd $HOME/output
|
||||
git init
|
||||
git config --global user.name "${GITHUB_ACTOR}"
|
||||
git config --global user.email "${GITHUB_ACTOR}@github.com"
|
||||
git add .
|
||||
git commit -m "latest html output"
|
||||
git push -f https://${GITHUB_ACTOR}:${{secrets.ACCESS_TOKEN}}@github.com/clearlinux/clear-linux-documentation.git HEAD:developmentHTML
|
||||
43
.github/workflows/publish.yml
vendored
Normal file
43
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- publish
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
sudo apt-get install -y python3-setuptools
|
||||
pip3 install --user -r requirements.txt
|
||||
- name: Build the docs
|
||||
run: |
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
make py
|
||||
make htmlall
|
||||
- name: Pre-deploy
|
||||
run: |
|
||||
wget https://github.com/clearlinux/clear-linux-documentation-zh-CN/releases/latest/download/clearlinux-docs-zh-CN.tar.gz
|
||||
mkdir source/_build/html/zh_CN
|
||||
tar xvzf clearlinux-docs-zh-CN.tar.gz -C source/_build/html/zh_CN
|
||||
mv source/_build/html $HOME/output
|
||||
- name: Deploy the docs
|
||||
run: |
|
||||
cd $HOME/output
|
||||
git init
|
||||
git config --global user.name "${GITHUB_ACTOR}"
|
||||
git config --global user.email "${GITHUB_ACTOR}@github.com"
|
||||
git add .
|
||||
git commit -m "latest html output"
|
||||
git push -f https://${GITHUB_ACTOR}:${{secrets.ACCESS_TOKEN}}@github.com/clearlinux/clear-linux-documentation.git HEAD:latestHTML
|
||||
- name: Publish the docs
|
||||
run: |
|
||||
wget ${{secrets.PUBLISH_URL}}
|
||||
cat clearlinux-latest
|
||||
Reference in New Issue
Block a user