Updating Stuff #139
Workflow file for this run
This file contains hidden or 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: BuildAndWebDeploy | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+\.[0-9]+\.[0-9]+' | |
| jobs: | |
| spstatus: | |
| runs-on: macos-latest | |
| name: Deploy spstat.us to BunnyCDN | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Echoing the tag name | |
| run: | | |
| echo '${{ github.ref_name }}' | |
| - name: Set Version Number | |
| id: version | |
| run: | | |
| echo "version=$(echo '${{ github.ref_name }}' | sed -re 's/v([0-9]{1,2})\.([0-9]{1,2})\.([0-9]{1,2})/v\1\.\2\.\3/g')" >> $GITHUB_OUTPUT | |
| - name: Sync index.html, manifest.json, robots.txt, & sitemap.xml for spstat.us | |
| run: | | |
| bash scripts/regex_html.sh ${{ github.ref_name }} | |
| if [ -f StatuspageHTML/output/index.html ]; then curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/index.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/output/index.html; fi; | |
| if [ -f StatuspageHTML/output/status/index.html ]; then curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/status/index.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/output/status/index.html; fi; | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/bunnycdn_errors/404.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/bunnycdn_errors/404.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/favicon.ico --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @img/cf/favicon.ico | |
| if [ -f StatuspageHTML/output/static/index.shell.html ]; then curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/static/index.shell.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/output/static/index.shell.html; fi; | |
| if [ -f StatuspageHTML/output/static/status.shell.html ]; then curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/static/status.shell.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/output/static/status.shell.html; fi; | |
| if [ -f StatuspageHTML/output/static/components.shell.html ]; then curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/static/components.shell.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/output/static/components.shell.html; fi; | |
| if [ -f StatuspageHTML/output/static/index.maintenance.html ]; then curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/static/index.maintenance.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/output/static/index.maintenance.html; fi; | |
| if [ -f StatuspageHTML/output/static/index.error.html ]; then | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/static/index.error.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/output/static/index.error.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/error.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/output/static/index.error.html | |
| fi; | |
| if [ -f StatuspageHTML/output/amp/index.html ]; then curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/amp/index.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/output/amp/index.html; fi; | |
| if [ -f StatuspageHTML/output/preact/index.html ]; then curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/preact/index.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/output/preact/index.html; fi; | |
| if [ -f StatuspageHTML/refresh/index.html ]; then curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/refresh/index.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/refresh/index.html; fi; | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/manifest.json --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/manifest.json | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/robots.txt --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/robots.txt | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/sitemap.xml --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @StatuspageHTML/sitemap.xml | |
| - name: Sync index.html, robots.txt, & sitemap.xml for reddit.spstat.us | |
| run: | | |
| echo "<!-- ${{ github.ref_name }} -->" >> sites/reddit/index.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_REDDIT_SPTAT_US }}/index.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_REDDIT_SPSTAT_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @sites/reddit/index.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_REDDIT_SPTAT_US }}/amp/index.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_REDDIT_SPSTAT_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @sites/reddit/amp.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_REDDIT_SPTAT_US }}/sitemap.xml --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_REDDIT_SPSTAT_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @sites/reddit/sitemap.xml | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_REDDIT_SPTAT_US }}/robots.txt --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_REDDIT_SPSTAT_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @sites/robots.txt | |
| - name: Purge spstat.us/, spstat.us/status/, spstat.us/components/, spstat.us/preact/, and spstat.us/amp/ | |
| run: | | |
| curl --silent --request GET --url 'https://api.bunny.net/purge?url=https://spstat.us/' --header 'AccessKey: ${{ secrets.BUNNY_API_KEY }}' --header 'accept: application/json' | |
| curl --silent --request GET --url 'https://api.bunny.net/purge?url=https://spstat.us/status/' --header 'AccessKey: ${{ secrets.BUNNY_API_KEY }}' --header 'accept: application/json' | |
| curl --silent --request GET --url 'https://api.bunny.net/purge?url=https://spstat.us/components/' --header 'AccessKey: ${{ secrets.BUNNY_API_KEY }}' --header 'accept: application/json' | |
| curl --silent --request GET --url 'https://api.bunny.net/purge?url=https://spstat.us/amp/' --header 'AccessKey: ${{ secrets.BUNNY_API_KEY }}' --header 'accept: application/json' | |
| curl --silent --request GET --url 'https://api.bunny.net/purge?url=https://spstat.us/preact/' --header 'AccessKey: ${{ secrets.BUNNY_API_KEY }}' --header 'accept: application/json' | |
| curl --silent --request GET --url 'https://api.bunny.net/purge?url=https://spstat.us/sitemap.xml' --header 'AccessKey: ${{ secrets.BUNNY_API_KEY }}' --header 'accept: application/json' | |
| curl --silent --request GET --url 'https://api.bunny.net/purge?url=https://spstat.us/robots.txt' --header 'AccessKey: ${{ secrets.BUNNY_API_KEY }}' --header 'accept: application/json' | |
| # curl --silent --request GET --url 'https://api.bunny.net/purge?url=https://spstat.us/styling/main.min.css' --header 'AccessKey: ${{ secrets.BUNNY_API_KEY }}' --header 'accept: application/json' | |
| # curl --silent --request GET --url 'https://api.bunny.net/purge?url=https://spstat.us/js/StatuspageHTML.min.js' --header 'AccessKey: ${{ secrets.BUNNY_API_KEY }}' --header 'accept: application/json' | |
| curl --silent --request GET --url 'https://api.bunny.net/purge?url=https://reddit.spstat.us/' --header 'AccessKey: ${{ secrets.BUNNY_API_KEY }}' --header 'accept: application/json' | |
| - name: Sync /js/ to ${{ github.ref_name }}/js/ | |
| run: | | |
| for x in $(ls -p js | grep -v /); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/js/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @js/$x; done | |
| for x in $(ls -p js | grep -v /); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/${{github.ref_name}}/js/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @js/$x; done | |
| - name: Sync /styling/ to ${{ github.ref_name }}/styling/ | |
| run: | | |
| for x in $(ls -p styling | grep -v /); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/styling/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @styling/$x; done | |
| for x in $(ls -p styling | grep -v /); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/${{github.ref_name}}/styling/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @styling/$x; done | |
| - name: Sync /modules/ to ${{ github.ref_name }}/modules/ | |
| run: | | |
| for x in $(ls -p modules | grep -v /); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/modules/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @modules/$x; done | |
| for x in $(ls -p modules | grep -v /); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/${{github.ref_name}}/modules/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @modules/$x; done | |
| - name: Sync /img/ | |
| run: | | |
| for x in $(ls -p img/cf/maskable/ | grep -v /); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/img/maskable/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @img/cf/maskable/$x; done | |
| for x in $(ls -p img/cf/status/lowres/ | grep -v /); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/img/status/lowres/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @img/cf/status/lowres/$x; done | |
| for x in $(ls -p img/cf/status/lowres/min/ | grep -v /); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/img/status/lowres/min/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @img/cf/status/lowres/min/$x; done | |
| for x in $(ls -p img/cf/status/highres/ | grep -v /); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/img/status/highres/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @img/cf/status/highres/$x; done | |
| for x in $(ls -p img/cf/status/highres/min/ | grep -v /); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/img/status/highres/min/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @img/cf/status/highres/min/$x; done | |
| for x in $(ls -p img/cf/screenshots/ | grep -v /); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/img/screenshots/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @img/cf/screenshots/$x; done | |
| for x in $(ls -p img/cf/screenshots/originals/min/ | grep -v /); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME }}/img/screenshots/originals/min/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @img/cf/screenshots/originals/min/$x; done | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref }} | |
| release_name: ${{ github.ref }} | |
| body: | | |
| Release of ${{ github.ref }} | |
| draft: false | |
| prerelease: false | |
| githubstatus: | |
| runs-on: macos-latest | |
| name: Backup githubsta.us to BunnyCDN | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Echoing the tag name | |
| run: | | |
| echo '${{ github.ref_name }}' | |
| - name: Set Version Number | |
| id: version | |
| run: | | |
| echo "version=$(echo '${{ github.ref_name }}' | sed -re 's/v([0-9]{1,2})\.([0-9]{1,2})\.([0-9]{1,2})/v\1\.\2\.\3/g')" >> $GITHUB_OUTPUT | |
| - name: Sync index.html, robots.txt, & sitemap.xml for githubstat.us backup | |
| run: | | |
| echo "<!-- ${{ github.ref_name }} -->" >> index.html | |
| echo "<!-- ${{ github.ref_name }} -->" >> ./amp/index.html | |
| bash scripts/regex_html.sh ${{ github.ref_name }} | |
| sed -i '' -re "s/githubstat\.us/ghstat\.us/g" index.html | |
| sed -i '' -re "s/githubstat\.us/ghstat\.us/g" amp/index.html | |
| sed -i '' -re "s/githubstat\.us/ghstat\.us/g" manifest.json | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/index.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @index.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/amp/index.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @amp/index.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/sitemap.xml --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @root_sitemap2.xml | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/robots.txt --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @robots.txt | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/manifest.json --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @manifest.json | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/favicon.ico --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @favicon.ico | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/error.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @error.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/static/index.loading.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @autogen/static/index.loading.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/static/index.unavailable.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @autogen/static/index.unavailable.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/static/index.maintenance.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @autogen/static/index.maintenance.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/static/index.error.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @autogen/static/index.error.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/static/index.good.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @autogen/static/index.good.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/static/index.none.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @autogen/static/index.none.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/static/index.critical.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @autogen/static/index.critical.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/static/index.major.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @autogen/static/index.major.html | |
| curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/static/index.minor.html --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @autogen/static/index.minor.html | |
| for x in $(ls -p *.js); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @$x; done | |
| # curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/sw.js --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @sw.js | |
| # curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/sw2.js --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @sw2.js | |
| - name: Sync /js/ & /styling/ | |
| run: | | |
| for x in $(ls -p js/*.js); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @$x; done | |
| for x in $(ls -p styling/*.css); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @$x; done | |
| - name: Sync /img/ | |
| run: | | |
| # for x in $(find img | grep -E "img\/((screenshots|status|maskable)\/((highres|lowres|original|webp)\/(min\/)?)?)?[A-Za-z0-9\_\-]*\.(webp|png)); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @$x; done | |
| for x in $(find img | grep -E "img\/[A-Za-z0-9\_\-]*\.(webp|png)"); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @$x; done | |
| for x in $(find img/maskable | grep -E "img\/maskable\/(webp\/)?[A-Za-z0-9]*\.(webp|png)"); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @$x; done | |
| # for x in $(find img/screenshots | grep -E "img\/screenshots\/(lowres\/|original\/)?[A-Za-z0-9\_]*\.(webp|png)"); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @$x; done | |
| # for x in $(find img/status | grep -E "img\/status\/((highres|lowres)\/(min\/)?)?[A-Za-z0-9\_\-]*\.(webp|png)"); do curl --silent --request PUT --url https://storage.bunnycdn.com/${{ secrets.BUNNY_STORAGE_ZONE_NAME_GITHUB_US }}/$x --header 'AccessKey: ${{ secrets.BUNNY_STORAGE_API_KEY_GITHUB_US }}' --header 'Content-Type: application/octet-stream' --header 'accept: application/json' --data-binary @$x; done | |
| publish-tauri: | |
| if: false | |
| name: Tauri Builds | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| settings: | |
| - platform: 'macos-latest' # for Arm based macs (M1 and above). | |
| args: '--target aarch64-apple-darwin' | |
| - platform: 'macos-latest' # for Intel based macs. | |
| args: '--target x86_64-apple-darwin' | |
| - platform: 'macos-latest' | |
| args: '--target universal-apple-darwin' | |
| - platform: 'ubuntu-22.04' | |
| args: '' | |
| - platform: 'windows-latest' | |
| args: '' | |
| runs-on: ${{ matrix.settings.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Dependencies (Ubuntu only) | |
| if: matrix.settings.platform == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: 'npm' | |
| cache-dependency-path: 'tauri/package-lock.json' | |
| - name: Install Rust Stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. | |
| targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
| - name: Rust Cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: './tauri/src-tauri -> target' | |
| - name: Install Frontend Dependencies | |
| run: | | |
| cd tauri/ && npm install && cd .. | |
| - name: Set Version Number | |
| id: version | |
| run: echo "::set-output name=version::$(echo ${{ github.ref_name }} | sed -e 's/v//g')" | |
| - name: Update Version Number | |
| run: | | |
| pwd | |
| cd tauri/ | |
| pwd | |
| sed -i -e 's/0.0.0/${{ steps.version.outputs.version }}/g' package.json | |
| sed -i -e 's/0.0.0/${{ steps.version.outputs.version }}/g' ./src-tauri/Cargo.toml | |
| sed -i -e 's/0.0.0/${{ steps.version.outputs.version }}/g' ./src-tauri/tauri.conf.json | |
| # - name: Test Build | |
| # run: cd tauri/ && npm run tauri build | |
| - name: Uploading Artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: release-artifacts | |
| path: | | |
| tauri/src-tauri/target/release/bundle/dmg/*.dmg | |
| tauri/src-tauri/target/release/bundle/appimage/*.AppImage | |
| - uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| projectPath: tauri/ | |
| tagName: ${{ github.ref_name }} | |
| releaseName: '${{ github.ref_name }}' | |
| releaseBody: 'See the assets to download this version and install.' | |
| releaseDraft: false | |
| prerelease: false | |
| args: ${{ matrix.settings.args }} |