Skip to content

Aktualizacja strony internetowej #240

Aktualizacja strony internetowej

Aktualizacja strony internetowej #240

Workflow file for this run

name: GitHub Pages
on:
push:
branches:
- gh-pages # Set a branch to deploy
pull_request:
branches:
- gh-pages
jobs:
deploy:
runs-on: ubuntu-latest
env:
HUGO_CACHEDIR: /tmp/hugo_cache
steps:
- uses: actions/checkout@v4
with:
submodules: recursive # Fetch the Docsy theme
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.134.3'
extended: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- uses: actions/cache@v4
with:
path: ${{ env.HUGO_CACHEDIR }}
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-hugomod-
- name: Build
run: |
git rm -rf ./docs
cd "$GITHUB_WORKSPACE"/website
npm i -D --save autoprefixer postcss-cli postcss
hugo --minify
- name: Upload test build
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: polish-ads-filter_website_${{github.sha}}
path: ./docs/
- name: Deploy
if: github.event.pull_request.merged == true || github.event_name == 'push'
run: |
git config --local user.name 'github-actions[bot]'
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
git add ./docs/*
git commit -m "Deploy updated website ($GITHUB_SHA)"
git push origin gh-pages