Added only template
This commit is contained in:
43
gitea/workflows/deploy.yml
Normal file
43
gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Deploy Vault
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
copy-into-repo:
|
||||
runs-on: docker
|
||||
|
||||
env:
|
||||
# URL of the repository to clone
|
||||
TEMPLATE_REPO_URL: https://git.aranroig.com/Syndria98/dnd-vault-template.git
|
||||
# Folder name inside the target repo where this repo's contents will be placed
|
||||
TARGET_SUBFOLDER: my-repo-contents
|
||||
|
||||
steps:
|
||||
- name: Checkout current repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: current-repo
|
||||
|
||||
- name: Clone target repository
|
||||
run: |
|
||||
git clone "$TEMPLATE_REPO_URL" target-repo
|
||||
|
||||
- name: Copy current repo contents into target subfolder
|
||||
run: |
|
||||
mkdir -p target-repo/$TARGET_SUBFOLDER
|
||||
# Exclude the .git directory from the copy
|
||||
rsync -av --exclude='.git' current-repo/ target-repo/$TARGET_SUBFOLDER/
|
||||
|
||||
- name: List result (dry run verification)
|
||||
run: |
|
||||
echo "=== Contents of target repo after copy ==="
|
||||
find target-repo -not -path '*/.git/*' | sort
|
||||
|
||||
- name: Upload result as artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: target-repo-with-contents
|
||||
path: target-repo/
|
||||
Reference in New Issue
Block a user