Skip to content

Commit

Permalink
Merge branch 'master' into feature/copy_screenshot_to_xochitl
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems authored Jan 24, 2023
2 parents 6168c58 + 1ba77ce commit 57d45db
Show file tree
Hide file tree
Showing 2,502 changed files with 544,421 additions and 2,305 deletions.
126 changes: 63 additions & 63 deletions .github/actions/sync-repository/action.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
name: Sync with remote repository
description: Synchronize packages with a remote repository
inputs:
local-path:
description: Path to the directory containing the packages to push
required: true
ssh-key:
description: Private SSH key to access the remote repository
required: true
ssh-known-hosts:
description: Public SSH key of the remote repository
required: true
remote-path:
description: Path to the remote directory to place the packages in
required: true
local-path:
description: Path to the directory containing the packages to push
required: true
ssh-key:
description: Private SSH key to access the remote repository
required: true
ssh-known-hosts:
description: Public SSH key of the remote repository
required: true
remote-path:
description: Path to the remote directory to place the packages in
required: true
runs:
using: composite
steps:
- name: Check for Apt updates
shell: bash
run: |
sudo apt-get update -yq
echo "aptVersion=sshfs-$(apt-cache policy sshfs | grep -oP '(?<=Candidate:\s)(.+)')" >> $GITHUB_ENV
- name: Cache Apt packages
uses: actions/cache@v2
id: cache-apt
with:
path: ~/.aptcache
key: ${{ env.aptVersion }}
- name: Install or restore Apt packages
shell: bash
env:
CACHE_HIT: ${{ steps.cache-apt.outputs.cache-hit }}
run: |
if [[ "$CACHE_HIT" != 'true' ]]; then
sudo apt-get install -yq sshfs
mkdir -p ~/.aptcache
sudo dpkg -L sshfs | while IFS= read -r f; do if test -f $f; then echo $f; fi; done | xargs cp --parents --target-directory ~/.aptcache/
else
sudo cp --verbose --force --recursive ~/.aptcache/* /
fi
- name: rsync packages and index
shell: bash
run: |
mkdir -p private
chmod 700 private
echo '${{ inputs.ssh-key }}' > private/id_rsa
echo '${{ inputs.ssh-known-hosts }}' > private/known_hosts
echo 'HostKeyAlgorithms +ssh-rsa' > private/config
echo 'PubkeyAcceptedKeyTypes +ssh-rsa' >> private/config
echo "UserKnownHostsFile=$(readlink -f private/known_hosts)" >> private/config
echo "IdentityFile=$(readlink -f private/id_rsa)" >> private/config
chmod 600 private/*
mkdir mnt
sshfs -F "$(readlink -f private/config)" \
'${{ inputs.remote-path }}' mnt
rsync \
--archive \
--verbose \
--compress \
--delete \
--no-owner \
--no-group \
'${{ inputs.local-path }}' mnt
umount mnt
rmdir mnt
rm -r private
using: composite
steps:
- name: Check for Apt updates
shell: bash
run: |
sudo apt-get update -yq
echo "syncAptVersion=sshfs-$(apt-cache policy sshfs | grep -oP '(?<=Candidate:\s)(.+)')" >> $GITHUB_ENV
- name: Cache Apt packages
uses: actions/cache@v2
id: cache-apt
with:
path: ~/.aptcache
key: ${{ env.syncAptVersion }}
- name: Install or restore Apt packages
shell: bash
env:
CACHE_HIT: ${{ steps.cache-apt.outputs.cache-hit }}
run: |
if [[ "$CACHE_HIT" != 'true' ]]; then
sudo apt-get install -yq sshfs
mkdir -p ~/.aptcache
sudo dpkg -L sshfs | while IFS= read -r f; do if test -f $f; then echo $f; fi; done | xargs cp --parents --target-directory ~/.aptcache/
else
sudo cp --verbose --force --recursive ~/.aptcache/* /
fi
- name: rsync packages and index
shell: bash
run: |
mkdir -p private
chmod 700 private
echo '${{ inputs.ssh-key }}' > private/id_rsa
echo '${{ inputs.ssh-known-hosts }}' > private/known_hosts
echo 'HostKeyAlgorithms +ssh-rsa' > private/config
echo 'PubkeyAcceptedKeyTypes +ssh-rsa' >> private/config
echo "UserKnownHostsFile=$(readlink -f private/known_hosts)" >> private/config
echo "IdentityFile=$(readlink -f private/id_rsa)" >> private/config
chmod 600 private/*
mkdir mnt
sshfs -F "$(readlink -f private/config)" \
'${{ inputs.remote-path }}' mnt
rsync \
--archive \
--verbose \
--compress \
--delete \
--no-owner \
--no-group \
'${{ inputs.local-path }}' mnt
umount mnt
rmdir mnt
rm -r private
45 changes: 45 additions & 0 deletions .github/actions/web/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build doxygen docs
description: Build doxygen docs
runs:
using: composite
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Cache Python environment
uses: actions/cache@v2
id: cache-python
with:
path: web/.venv
key: web/.venv-${{ hashFiles('web/requirements.txt') }}
- name: Check for Apt updates
shell: bash
run: |
sudo apt-get update -yq
echo "webAptVersion=doxygen-$(apt-cache policy doxygen | grep -oP '(?<=Candidate:\s)(.+)')-graphviz-$(apt-cache policy graphviz | grep -oP '(?<=Candidate:\s)(.+)')-libgraphviz-dev-$(apt-cache policy libgraphviz-dev | grep -oP '(?<=Candidate:\s)(.+)')" >> $GITHUB_ENV
- name: Cache Apt packages
uses: actions/cache@v2
id: cache-apt
with:
path: ~/.aptcache
key: ${{ env.webAptVersion }}
- name: Install or restore Apt packages
shell: bash
env:
CACHE_HIT: ${{ steps.cache-apt.outputs.cache-hit }}
run: |
if [[ "$CACHE_HIT" != 'true' ]]; then
sudo apt-get install -yq doxygen graphviz libgraphviz-dev
mkdir -p ~/.aptcache
sudo dpkg -L doxygen graphviz libgraphviz-dev | while IFS= read -r f; do if test -f $f; then echo $f; fi; done | xargs cp --parents --target-directory ~/.aptcache/
else
sudo cp --verbose --force --recursive ~/.aptcache/* /
fi
- name: Build website
shell: bash
run: cd web && make prod
- name: Generate liboxide docs
shell: bash
run: |
cd shared/liboxide && make prod
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,3 @@ jobs:
with:
name: packages
path: output

57 changes: 26 additions & 31 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
name: publish
on:
push:
branches:
- master
paths:
- 'web/**'
workflow_dispatch:
push:
branches:
- master
paths:
- 'web/**'
- 'shared/liboxide/**'
- '.github/actions/web/**'
- '.github/actions/sync-repository/**'
workflow_dispatch:
jobs:
publish:
name: Build and publish the website
runs-on: ubuntu-20.04
steps:
- name: Checkout the Git repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Cache Python environment
uses: actions/cache@v2
id: cache-python
with:
path: web/.venv
key: web/.venv-${{ hashFiles('web/requirements.txt') }}
- name: Build website
run: cd web && make prod
- name: Sync website with the remote repository
uses: ./.github/actions/sync-repository
with:
local-path: web/dist/
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
remote-path: ${{ secrets.REMOTE_SSH }}:/_web
publish:
name: Build and publish the website
runs-on: ubuntu-20.04
steps:
- name: Checkout the Git repository
uses: actions/checkout@v2
with:
submodules: true
- name: Build web
uses: ./.github/actions/web
- name: Sync website with the remote repository
uses: ./.github/actions/sync-repository
with:
local-path: web/dist/
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
remote-path: ${{ secrets.REMOTE_SSH }}:/_web
35 changes: 35 additions & 0 deletions .github/workflows/web.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build website

on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!master' # excludes master
paths:
- 'web/**'
- 'shared/liboxide/**'
- '.github/actions/web/**'
pull_request:
paths:
- 'web/**'
- 'shared/liboxide/**'
- '.github/actions/web/**'
jobs:
web:
name: Build web
runs-on: ubuntu-latest
steps:
- name: Checkout the Git repository
uses: actions/checkout@v2
with:
submodules: true
- name: Build web
uses: ./.github/actions/web
- name: Save web
uses: actions/upload-artifact@v2
with:
name: web
path: web/dist

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ release/
.qmake.stash
applications/*/Makefile
result
*.orig
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "shared/liboxide/doxygen-awesome-css"]
path = shared/liboxide/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git
Loading

0 comments on commit 57d45db

Please sign in to comment.