Improve blog copy. #260
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: Publish minified HTML as release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build_and_publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.11' | |
| - name: Install Dependencies | |
| run: pip install -r./requirements.txt | |
| working-directory: "./actions" | |
| - name: Generate HTML | |
| run: python release.py | |
| working-directory: "./actions" | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: v0.${{ github.run_id }}-${{ github.run_attempt }} | |
| release_name: Minified site | |
| body: The entire site compressed into a single .html file. This release is created automatically on every push to the repo. Please disregard the version number and simply download the latest one. | |
| draft: false | |
| prerelease: false | |
| - name: Upload Release Asset | |
| id: upload-release-asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: "./actions/minified.html" | |
| asset_name: library_of_time.html | |
| asset_content_type: text/html | |
| - name: Trigger Vercel Deploy | |
| if: success() | |
| run: | | |
| if [ -n "${{ secrets.VERCEL_DEPLOY_HOOK }}" ]; then | |
| curl -sf -X POST "${{ secrets.VERCEL_DEPLOY_HOOK }}" | |
| fi |