Adding Blog of Intro Community Session. (#8) #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Github Pages | |
| # run when a commit is pushed to "source" branch | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # checkout to the commit that has been pushed | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: true # Fetch Hugo themes (true OR recursive) | |
| fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
| # install Hugo | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v2 | |
| with: | |
| hugo-version: '0.128.0' | |
| extended: true | |
| # build website | |
| - name: Build | |
| run: hugo --minify | |
| - name: Custom files | |
| run: | | |
| echo "osac.org.np" > ./public/CNAME | |
| echo "" > ./public/.nojekyll | |
| # push the generated content into the `gh-pages` branch. | |
| - name: Deploy | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: gh-pages | |
| folder: ./public | |
| clean-exclude: pr-preview/ | |
| force: false |