From f94ccc06915a2671c2ef2604cd5383603df40d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Tue, 12 Apr 2022 13:45:42 +0200 Subject: [PATCH] ci: publish workflow --- .github/workflows/publish.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..88fd427 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,26 @@ +name: Publish + +on: + push: + branches: [ main ] + workflow_dispatch: {} + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: main + fetch-depth: 0 + - name: Set up .wiki remote + run: git remote add dot-wiki git@github.com:ohmyzsh/ohmyzsh.wiki.git + - name: Set up deploy keys to push to remote + run: | + # Write deploy key to ~/.ssh/id_ed25519. Git will automatically + # use ~/.ssh/id_ed25519 to log in to github.com (see `man ssh`) + mkdir -p ~/.ssh + echo "${{ secrets.WIKI_DEPLOY_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + - name: Push commits to main wiki remote + run: git push --force dot-wiki HEAD:master