Skip to content

Merge pull request #186 from flotiq/feature/add-dark-mode #107

Merge pull request #186 from flotiq/feature/add-dark-mode

Merge pull request #186 from flotiq/feature/add-dark-mode #107

Workflow file for this run

name: CI
# Controls when the action will run. Triggers the workflow on push
# events but only for the master branch
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest # The type of runner that the job will run on
steps: # Steps represent a sequence of tasks that will be executed as part of the job
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install -r requirements.txt
- run: mkdocs build
- run: mkdir public
- run: mv ./site ./public/docs
- name: Cloudflare
run: |
npm install -g @cloudflare/wrangler
# wrangler init --site cms-docs
sed -i 's+account_id = '\'\''+account_id = '"'"$ACCOUNT_ID"'"'+g' wrangler.toml
sed -i 's+bucket = ""+bucket = "./public"+g' wrangler.toml
sed -i 's+zone_id = '\'\''+zone_id = '"'"$ZONE_ID"'"'+g' wrangler.toml
sed -i 's+workers_dev = true++g' wrangler.toml
echo "[env.production]" >> wrangler.toml
echo "route = 'flotiq.com/docs/*'" >> wrangler.toml
echo 'zone_id = '"'"$ZONE_ID"'" >> wrangler.toml
mkdir -p /home/runner/.wrangler/config/
echo api_token = '"'"$API_TOKEN"'"' > /home/runner/.wrangler/config/default.toml
cat wrangler.toml
wrangler publish --env=production
# Refresh sitemap in Google and Bing
curl "https://www.google.com/webmasters/sitemaps/ping?sitemap=https://flotiq.com/docs/sitemap.xml"
curl "https://www.bing.com/webmaster/ping.aspx?siteMap=https://flotiq.com/docs/sitemap.xml"
shell: bash
env:
API_TOKEN: ${{ secrets.API_TOKEN }}
ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }}
ZONE_ID: ${{ secrets.ZONE_ID }}