Skip to content

Commit

Permalink
Migrate to GitHub pages
Browse files Browse the repository at this point in the history
  • Loading branch information
janheinrichmerker committed Mar 3, 2024
1 parent 1738726 commit 0e4e79f
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ jobs:
name: public-pages
path: public/
if-no-files-found: error
- name: πŸ“€ Upload public pages (for GitHub Pages)
uses: actions/upload-pages-artifact@v3
with:
path: public/
deploy:
name: πŸš€ Deploy
if: |
Expand All @@ -73,21 +77,22 @@ jobs:
startsWith(github.ref, 'refs/tags'))
needs:
- build
permissions:
pages: write
id-token: write
environment:
name: GitHub Pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: πŸ“₯ Download public pages
uses: actions/download-artifact@v4
with:
name: public-pages
path: public/
- name: 🧰 Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DEPLOY_SSH_KEY }}
known_hosts: ${{ secrets.DEPLOY_SSH_KNOWN_HOSTS }}
- name: πŸš€ Deploy via Rsync
run: |
rsync -avz public/ ${{ secrets.DEPLOY_SSH_USER }}@${{ secrets.DEPLOY_SSH_HOST }}:${{ secrets.DEPLOY_SSH_TARGET_PATH }}
- name: πŸš€ Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
release:
name: πŸš€ Create GitHub release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
Expand All @@ -114,4 +119,3 @@ jobs:
draft: false
prerelease: false
generate_release_notes: true
files: public.zip

0 comments on commit 0e4e79f

Please sign in to comment.