Test with github
This commit is contained in:
parent
a128099d92
commit
bcf7bfe035
@ -1,15 +0,0 @@
|
|||||||
name: Deploy website
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
# branches:
|
|
||||||
# - master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Call the Docker Compose stack to build the page
|
|
||||||
run: docker-compose exec jekyll build
|
|
55
.github/workflows/deploy.yml
vendored
55
.github/workflows/deploy.yml
vendored
@ -4,32 +4,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
deploy:
|
||||||
build_dev:
|
name: Deploy to Production
|
||||||
name: Development Build
|
|
||||||
if: github.ref != 'refs/heads/master'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: production
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
deployments: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout branch
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Write the commit hash into the config
|
|
||||||
run: echo "commit = \"$(git rev-parse HEAD | cut -c1-7)\"" >> config.toml
|
|
||||||
|
|
||||||
- name: Build only
|
|
||||||
uses: shalzz/zola-deploy-action@v0.19.1
|
|
||||||
env:
|
|
||||||
BUILD_ONLY: true
|
|
||||||
BUILD_FLAGS: --drafts
|
|
||||||
|
|
||||||
build_prod:
|
|
||||||
name: Production Build
|
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment: production
|
environment: production
|
||||||
permissions:
|
permissions:
|
||||||
@ -40,20 +16,15 @@ jobs:
|
|||||||
- name: Checkout master
|
- name: Checkout master
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Write the commit hash into the config
|
- name: Build website
|
||||||
run: echo "commit = \"$(git rev-parse HEAD | cut -c1-7)\"" >> config.toml
|
run: docker compose exec jekyll build
|
||||||
|
|
||||||
- name: Build only
|
# - name: Publish to Cloudflare Pages
|
||||||
uses: shalzz/zola-deploy-action@v0.19.1
|
# uses: cloudflare/pages-action@v1
|
||||||
env:
|
# with:
|
||||||
BUILD_ONLY: true
|
# apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
# accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
- name: Publish to Cloudflare Pages
|
# projectName: ewpratten
|
||||||
uses: cloudflare/pages-action@v1
|
# directory: public
|
||||||
with:
|
# gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
# wranglerVersion: '2'
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
||||||
projectName: ewpratten
|
|
||||||
directory: public
|
|
||||||
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
wranglerVersion: '2'
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user