Merge pull request #195 from flotiq/hotfix/dark-mode-disqus-padding #108
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: 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 }} |