Modify setTimeOut in order to avoid CSP errors #131
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Site | |
on: | |
push: | |
branches: [main] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Fetch Github Release Asset | |
uses: dsaltares/[email protected] | |
with: | |
repo: cobalt-org/cobalt.rs | |
file: cobalt-v0.19.2-x86_64-unknown-linux-gnu.tar.gz | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate _data/env.json for Spanish | |
run: | | |
mkdir -p es/_data | |
echo '{ | |
"AIRTABLE_API_KEY": "${AIRTABLE_API_KEY}", | |
"AIRTABLE_BASE_ID": "${AIRTABLE_BASE_ID}", | |
"AIRTABLE_TABLE_ID": "${AIRTABLE_TABLE_ID}" | |
}' > es/_data/env.json | |
env: | |
AIRTABLE_API_KEY: ${{ vars.AIRTABLE_API_KEY }} | |
AIRTABLE_BASE_ID: ${{ vars.AIRTABLE_BASE_ID }} | |
AIRTABLE_TABLE_ID: ${{ vars.AIRTABLE_TABLE_ID }} | |
- name: Generate _data/env.json for English | |
run: | | |
mkdir -p en/_data | |
echo '{ | |
"AIRTABLE_API_KEY": "${AIRTABLE_API_KEY}", | |
"AIRTABLE_BASE_ID": "${AIRTABLE_BASE_ID}", | |
"AIRTABLE_TABLE_ID": "${AIRTABLE_TABLE_ID}" | |
}' > en/_data/env.json | |
env: | |
AIRTABLE_API_KEY: ${{ vars.AIRTABLE_API_KEY }} | |
AIRTABLE_BASE_ID: ${{ vars.AIRTABLE_BASE_ID }} | |
AIRTABLE_TABLE_ID: ${{ vars.AIRTABLE_TABLE_ID }} | |
- name: Build site | |
run: | | |
tar xfv cobalt-* | |
rm -rf doc | |
./cobalt build | |
- name: Publish Cloudflare | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: website | |
directory: _site | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |