feat: new deploy.yml
This commit is contained in:
parent
b6b0c890df
commit
91e57a4e40
1 changed files with 39 additions and 38 deletions
17
.github/workflows/deploy.yml
vendored
17
.github/workflows/deploy.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: Deploy to Github Pages
|
name: Deploy to Home Server
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -11,8 +11,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
# Give the default GITHUB_TOKEN write permission to commit and push the
|
|
||||||
# added or changed files to the repository.
|
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -29,6 +27,7 @@ jobs:
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "^1.17.0"
|
go-version: "^1.17.0"
|
||||||
|
|
||||||
- run: go version
|
- run: go version
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
|
@ -41,9 +40,11 @@ jobs:
|
||||||
run: hugo --minify --gc
|
run: hugo --minify --gc
|
||||||
|
|
||||||
- name: Deploy 🚀
|
- name: Deploy 🚀
|
||||||
uses: JamesIves/github-pages-deploy-action@v4
|
uses: easingthemes/ssh-deploy@v2
|
||||||
with:
|
with:
|
||||||
branch: gh-pages
|
server: ${{ secrets.SERVER_DOMAIN }}
|
||||||
folder: public
|
username: ${{ secrets.SERVER_USERNAME }}
|
||||||
clean: true
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
single-commit: true
|
local: ./public
|
||||||
|
remote: /var/www/html/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue