File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,25 +70,38 @@ jobs:
7070 docker run --rm -v $(pwd):/src -w /src ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.check_image.outputs.ref }} just build
7171
7272 - name : Upload artifact
73- uses : actions/upload-pages- artifact@v3
73+ uses : actions/upload-artifact@v4
7474 with :
75+ name : site
7576 path : build/
7677
7778 deploy :
7879 needs : build
7980 if : github.ref_name == github.event.repository.default_branch
80- environment :
81- name : github-pages
82- url : ${{ steps.deployment.outputs.page_url }}
8381 concurrency :
84- group : " pages "
82+ group : " deploy "
8583 cancel-in-progress : false
86- permissions :
87- contents : read
88- pages : write
89- id-token : write
9084 runs-on : ubuntu-latest
85+ environment :
86+ name : production
87+ deployment : true
9188 steps :
92- - name : Deploy to GitHub Pages
93- id : deployment
94- uses : actions/deploy-pages@v4
89+ - name : Download artifact
90+ uses : actions/download-artifact@v4
91+ with :
92+ name : site
93+ path : build/
94+
95+ - name : Set up SSH key
96+ run : |
97+ install -m 600 -D /dev/null ~/.ssh/id_ed25519
98+ echo "${{ vars.SSH_CONFIG }}" > ~/.ssh/config
99+ echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
100+
101+ - name : Deploy via rsync
102+ run : |
103+ rsync -avz --delete build/ "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:${{ secrets.DEPLOY_PATH }}"
104+
105+ - name : Clean up SSH key
106+ if : always()
107+ run : rm -f ~/.ssh/id_ed25519
You can’t perform that action at this time.
0 commit comments