committed by
GitHub
2 changed files with 87 additions and 0 deletions
@ -0,0 +1,40 @@ |
|||||
|
on: |
||||
|
pull_request_target: |
||||
|
types: [opened, reopened, synchronize] |
||||
|
|
||||
|
jobs: |
||||
|
publish: |
||||
|
runs-on: ubuntu-latest |
||||
|
permissions: |
||||
|
contents: read |
||||
|
deployments: write |
||||
|
name: Publish Preview to Cloudflare Pages |
||||
|
steps: |
||||
|
- name: Checkout |
||||
|
uses: actions/checkout@v3 |
||||
|
|
||||
|
- name: Check for missing base language strings |
||||
|
run: python3 find_missing_i18n_strings.py |
||||
|
|
||||
|
- name: Setup Hugo |
||||
|
uses: peaceiris/actions-hugo@v2 |
||||
|
with: |
||||
|
hugo-version: 'latest' |
||||
|
# extended: true |
||||
|
|
||||
|
- name: Generate language files |
||||
|
run: python3 setup-pages-for-supported-languages.py |
||||
|
|
||||
|
- name: Build |
||||
|
run: hugo --minify |
||||
|
|
||||
|
- name: move redirects file into place |
||||
|
run: cp _redirects public/ |
||||
|
|
||||
|
- name: Publish to Cloudflare Pages |
||||
|
uses: cloudflare/pages-action@v1 |
||||
|
with: |
||||
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
||||
|
accountId: b2eab8b024e2fc0155a48c4fc7115e64 |
||||
|
projectName: almalinux-org |
||||
|
directory: public |
@ -0,0 +1,47 @@ |
|||||
|
--- |
||||
|
on: |
||||
|
push: |
||||
|
branches: master |
||||
|
|
||||
|
jobs: |
||||
|
publish: |
||||
|
runs-on: ubuntu-latest |
||||
|
permissions: |
||||
|
contents: read |
||||
|
deployments: write |
||||
|
name: Publish to Cloudflare Pages |
||||
|
steps: |
||||
|
- name: Checkout |
||||
|
uses: actions/checkout@v3 |
||||
|
|
||||
|
- name: Check for missing base language strings |
||||
|
run: python3 find_missing_i18n_strings.py |
||||
|
|
||||
|
- name: Setup Hugo |
||||
|
uses: peaceiris/actions-hugo@v2 |
||||
|
with: |
||||
|
hugo-version: 'latest' |
||||
|
# extended: true |
||||
|
|
||||
|
- name: Generate language files |
||||
|
run: python3 setup-pages-for-supported-languages.py |
||||
|
|
||||
|
- name: Build |
||||
|
run: hugo --minify |
||||
|
|
||||
|
# this is needed to trick CF into deploying to production |
||||
|
# can probably be removed where there is a solution to |
||||
|
# https://github.com/cloudflare/pages-action/issues/63 |
||||
|
- name: remove git dir |
||||
|
run: rm -rf .git |
||||
|
|
||||
|
- name: move redirects file into place |
||||
|
run: cp _redirects public/ |
||||
|
|
||||
|
- name: Publish to Cloudflare Pages |
||||
|
uses: cloudflare/pages-action@v1 |
||||
|
with: |
||||
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
||||
|
accountId: b2eab8b024e2fc0155a48c4fc7115e64 |
||||
|
projectName: almalinux-org |
||||
|
directory: public |
Loading…
Reference in new issue