diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 000000000..0af2d4fe5 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,59 @@ +name: Build and Deploy Pages +on: + push: + branches: [ main ] # or your branch + +permissions: + contents: read + pages: write + id-token: write + actions: read # required by deploy-pages@v4 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Show disk usage + run: df -h + + - name: Free disk space + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: true + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + + - uses: actions/checkout@v5 + with: + fetch-depth: 1 + filter: 'blob:none' + sparse-checkout: | + . + + # Example: Jekyll (swap for Hugo/Node/etc.) + - uses: ruby/setup-ruby@v1 + with: { ruby-version: '3.3' } + - run: | + gem install bundler jekyll + bundle install --path vendor/bundle + JEKYLL_ENV=production bundle exec jekyll build -d _site + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: _site + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4