Skip to content

Merge branch 'staging' into publish #261

Merge branch 'staging' into publish

Merge branch 'staging' into publish #261

Workflow file for this run

# workflow name
name: Deploy Pages
# fire on
on: [push, pull_request]
# stuff to do
jobs:
# Install/Process Templates
install-process-templates:
name: Process Templates
runs-on: ${{ matrix.os-name }}
# VM settings
# os & python versions
strategy:
matrix:
# pages on one OS
os-name: [ubuntu-latest]
python-version: [3.8]
steps:
# checkout commit
- name: Checkout commit
uses: actions/checkout@v4.0.0
# install python
- name: Install Python
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ matrix.python-version }}
architecture: "x64"
- run: |
python --version
# install dependencies via pip
- name: Install Dependencies via pip
env:
OS_NAME: ${{ matrix.os-name }}
run: |
python ./resources/ci/common/local_install.py
# Analyze used GitHub Actions
- name: Analyze used GitHub Actions
shell: bash
run: |
python ./resources/ci/common/list_actions.py
# Prepare AppVersion
- name: Prepare AppVersion
run: |
python ./resources/ci/common/prepare_appversion.py
# Process Templates
- name: Process Templates
run: |
python ./resources/ci/common/process_templates.py
# Process Metadata
- name: Process Metadata
run: |
python ./resources/ci/common/process_metadata.py
# Process Previews
- name: Process Previews
run: |
python ./resources/ci/common/process_previews.py
# Cleanup Workspace
- name: Cleanup Workspace
run: |
python ./resources/ci/common/cleanup.py
# upload pages artifact for later step
- name: Upload Pages Artifact
uses: actions/upload-artifact@v3.1.3
with:
name: pages-${{ matrix.os-name }}
path: ./
# Install/Publish Pages
install-publish-pages:
name: Publish Pages
runs-on: ${{ matrix.os-name }}
needs: [ install-process-templates ]
# VM settings
# os & python versions
strategy:
matrix:
# pages on one OS
os-name: [ubuntu-latest]
python-version: [3.8]
steps:
# checkout gh-pages
- name: Checkout commit
uses: actions/checkout@v4.0.0
with:
ref: gh-pages
# download pages artifact
- name: Download Pages Artifact
uses: actions/download-artifact@v3.0.2
with:
name: pages-${{ matrix.os-name }}
path: ./
# Prepare for GH-Pages
- name: Prepare for GH-Pages
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
# List Differences
- name: List Differences
run: |
git diff --name-status --cached
# Set Commit
- name: Set Commit
run: |
git commit -q -F commit.txt
git log
# Push to GH-Pages
- name: Push to GH-Pages (PUBLISH)
run: |
git push
if: contains(github.ref, 'publish')
# Install/Discord Notif
install-discord-notif:
name: Discord Notification
runs-on: ${{ matrix.os-name }}
needs: [ install-publish-pages ]
# VM settings
# os & python versions
strategy:
matrix:
# pages on one OS
os-name: [ubuntu-latest]
python-version: [3.8]
steps:
# checkout commit
- name: Checkout commit
uses: actions/checkout@v4.0.0
# install python
- name: Install Python
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ matrix.python-version }}
architecture: "x64"
- run: |
python --version
# install dependencies via pip
- name: Install Dependencies via pip
env:
OS_NAME: ${{ matrix.os-name }}
run: |
python ./resources/ci/common/local_install.py
- name: Install Moar Dependencies via pip
run: |
python -m pip install pytz requests
- name: Build Discord Notification Payload (!PUBLISH)
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_UPDATES }}
run: |
python ./resources/ci/common/prepare_discord_notif.py
if: contains(github.ref, 'publish') != true
- name: Build Discord Notification Payload (PUBLISH)
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_RELEASES }}
run: |
python ./resources/ci/common/prepare_discord_notif.py
if: contains(github.ref, 'publish')