Bump actions/checkout from 2.4.0 to 3
[yosql.git] / .github / workflows / website.yml
blob888a7be07a43b0209e9cea4c4c8521a674874436
1 name: Publish Website
2 on:
3   push:
4     branches:
5       - main
6     paths:
7       - "yosql-website/**"
8 env:
9   PROJECT_URL: yosql.projects.metio.wtf
10 jobs:
11   website:
12     name: Website
13     runs-on: ubuntu-latest
14     steps:
15       - id: checkout
16         name: Clone Git Repository
17         uses: actions/checkout@v3
18         with:
19           fetch-depth: 0 # required in order to get all tags
20       - id: hugo
21         name: Setup Hugo
22         uses: peaceiris/actions-hugo@v2.5.0
23         with:
24           hugo-version: latest
25       - id: previous
26         name: Get Last Release
27         run: echo "::set-output name=version::$(git describe --abbrev=0 --tags)"
28       - id: website
29         name: Build Website
30         run: hugo --minify --i18n-warnings --path-warnings --source yosql-website
31         env:
32           YOSQL_RELEASE: ${{ steps.previous.outputs.version }}
33       - id: deploy
34         name: Deploy Website
35         uses: peaceiris/actions-gh-pages@v3.8.0
36         with:
37           github_token: ${{ secrets.GITHUB_TOKEN }}
38           publish_dir: ./yosql-website/public
39           force_orphan: true
40           cname: ${{ env.PROJECT_URL }}