refactor: workflow
parent
8072e3fc82
commit
6a68ea1879
|
@ -27,23 +27,18 @@ jobs:
|
||||||
extended: true
|
extended: true
|
||||||
- name: Build `mtf.wiki`
|
- name: Build `mtf.wiki`
|
||||||
run: hugo --minify --enableGitInfo
|
run: hugo --minify --enableGitInfo
|
||||||
- name: Deploy `mtf.wiki`
|
- name: Upload `mtf.wiki` artifact
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
|
uses: actions/upload-pages-artifact@v1
|
||||||
with:
|
with:
|
||||||
deploy_key: ${{ secrets.DEPLOY_KEY }}
|
path: public
|
||||||
publish_branch: master
|
|
||||||
publish_dir: ./public
|
|
||||||
cname: mtf.wiki
|
|
||||||
external_repository: mtf-wiki/mtf-wiki.github.io
|
|
||||||
force_orphan: true
|
|
||||||
- name: Build `mtfwiki.com`
|
- name: Build `mtfwiki.com`
|
||||||
run: hugo --minify --enableGitInfo --baseURL https://mtfwiki.com
|
run: hugo --minify --enableGitInfo --baseURL https://mtfwiki.com
|
||||||
- name: Deploy `mtfwiki.com`
|
- name: Deploy `mtfwiki.com`
|
||||||
uses: reggionick/s3-deploy@v3
|
uses: reggionick/s3-deploy@v3
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
with:
|
with:
|
||||||
folder: ./public
|
folder: public
|
||||||
bucket: mtfwiki.com
|
bucket: mtfwiki.com
|
||||||
bucket-region: ${{ secrets.S3_BUCKET_REGION }}
|
bucket-region: ${{ secrets.S3_BUCKET_REGION }}
|
||||||
delete-removed: true
|
delete-removed: true
|
||||||
|
@ -51,3 +46,16 @@ jobs:
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
deploy:
|
||||||
|
needs: build
|
||||||
|
permissions:
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v1
|
||||||
|
|
Loading…
Reference in New Issue