mirror of
https://github.com/xemu-project/xemu-website.git
synced 2024-11-23 11:29:43 +00:00
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
on:
|
|
workflow_dispatch:
|
|
push:
|
|
schedule:
|
|
- cron: '0 * */1 * *'
|
|
|
|
jobs:
|
|
Build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Build
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install python3-venv cssmin
|
|
mkdir env
|
|
python3 -m venv env
|
|
source env/bin/activate
|
|
python -m pip install -r requirements.txt
|
|
./build.sh
|
|
cssmin > dist/theme.css.min < dist/theme.css
|
|
mv dist/theme.css.min dist/theme.css
|
|
echo "xemu.app" > dist/CNAME
|
|
- uses: actions/upload-pages-artifact@v1
|
|
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/heads/master')
|
|
with:
|
|
path: dist
|
|
Deploy:
|
|
needs: [build]
|
|
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/heads/master')
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
pages: write
|
|
id-token: write
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- id: deployment
|
|
uses: actions/deploy-pages@v1.2.3
|