WIP: Auto-deploy action #22
1 changed files with 29 additions and 0 deletions
29
.forgejo/workflows/deploy.yml
Normal file
29
.forgejo/workflows/deploy.yml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
name: Deploy on webserver
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
|
||||
# make it run on manual trigger
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
# AFAIK, what's needed to deploy the slides is
|
||||
# 1. cloning the repo
|
||||
# 2. recursively getting submodules and annexed contents
|
||||
jobs:
|
||||
deploy:
|
||||
name: Clone slides repository to webserver
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: move previous checkout
|
||||
run: mv /www/slides.edu.datalad.org /www/_slides.edu.datalad.org
|
||||
- name: fresh checkout
|
||||
uses: https://hub.datalad.org/forgejo/datalad-clone-action@v1
|
||||
with:
|
||||
path: /www/slides.edu.datalad.org
|
||||
recursive: true
|
||||
get_content: .
|
||||
- name: wipe previous checkout
|
||||
run: chmod -R +w /www/_slides.edu.datalad.org && rm -rf /www/_slides.edu.datalad.org
|
||||
Loading…
Reference in a new issue