Change next version #137
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '*' | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: pip | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Get minify | |
run: wget -qO- https://github.com/tdewolff/minify/releases/download/v2.12.7/minify_linux_amd64.tar.gz | tar -xz | |
- name: Set version | |
run: | | |
echo "${GITHUB_REF_NAME}" > version | |
cat conf.py | |
- name: Build pages | |
run: sh ./buildAll.sh | |
- name: Minify | |
run: ./minify -v -r --sync -o help_pages/ _build | |
- name: Create archive | |
run: | | |
zip -r archive.zip help_pages \ | |
-x help_pages/404.html help_pages/google97d4e1b665179c67.html help_pages/index.html _add_to_build/sitemap_index.xml **/sitemap.xml **/.doctrees/** **/objects.inv | |
- name: Add to build folder | |
run: cp -r _add_to_build/* help_pages | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifact | |
path: archive.zip | |
- name: Configure GitHub Pages | |
if: ${{ github.ref_type == 'tag' }} | |
uses: actions/configure-pages@v3 | |
- name: Upload pages | |
if: ${{ github.ref_type == 'tag' }} | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: help_pages | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: npm | |
cache-dependency-path: 'automation-test/package-lock.json' | |
- name: Test | |
run: | | |
npm ci | |
npm start | |
working-directory: automation-test | |
deploy: | |
if: github.ref_type == 'tag' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 | |
scan: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get gitleaks | |
run: | | |
wget -qO- https://github.com/gitleaks/gitleaks/releases/download/v8.18.0/gitleaks_8.18.0_linux_x64.tar.gz | tar xvz | |
- name: Check for secrets | |
run: | | |
./gitleaks detect -v --redact |