Add deployment workflow #7
1 changed files with 2 additions and 7 deletions
|
@ -5,7 +5,6 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- test-deploy
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
|
@ -20,10 +19,6 @@ jobs:
|
||||||
# Hack to set the cache in the working directory
|
# Hack to set the cache in the working directory
|
||||||
HOME="$GITHUB_WORKSPACE" nix-build dgnum.eu
|
HOME="$GITHUB_WORKSPACE" nix-build dgnum.eu
|
||||||
|
|
||||||
# - name: Clone dgnum.eu pages
|
|
||||||
# run: |
|
|
||||||
# git clone https://codeberg.org/DGNum/pages
|
|
||||||
#
|
|
||||||
- name: Push new website
|
- name: Push new website
|
||||||
run: |
|
run: |
|
||||||
export HOME="$GITHUB_WORKSPACE"
|
export HOME="$GITHUB_WORKSPACE"
|
||||||
|
@ -59,13 +54,13 @@ jobs:
|
||||||
echo "[+] Creating commit"
|
echo "[+] Creating commit"
|
||||||
ORIGIN_COMMIT="https://$GIT_ORIGIN_SERVER/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
ORIGIN_COMMIT="https://$GIT_ORIGIN_SERVER/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
||||||
git add .
|
git add .
|
||||||
git diff-index --quiet HEAD || git commit --message "Automatic pages update"
|
git diff-index --quiet HEAD || git commit --message "Automatic pages update from $ORIGIN_COMMIT"
|
||||||
|
|
||||||
echo "[+] Pushing update"
|
echo "[+] Pushing update"
|
||||||
git push "$GIT_CMD_REPOSITORY" --set-upstream main
|
git push "$GIT_CMD_REPOSITORY" --set-upstream main
|
||||||
env:
|
env:
|
||||||
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
|
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
|
||||||
GIT_REPOSITORY: pages-test
|
GIT_REPOSITORY: pages
|
||||||
GIT_USER_EMAIL: automated-update@dgnum.eu
|
GIT_USER_EMAIL: automated-update@dgnum.eu
|
||||||
GIT_USER_NAME: Forgejo Action
|
GIT_USER_NAME: Forgejo Action
|
||||||
GIT_ORIGIN_SERVER: git.hubrecht.ovh
|
GIT_ORIGIN_SERVER: git.hubrecht.ovh
|
||||||
|
|
Loading…
Reference in a new issue