Update release name #6
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: build and deploy jasonheppler.org | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_deploy: | |
name: build and deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
with: | |
submodules: true | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.135.0' | |
- name: Build | |
run: hugo --minify | |
- name: Create Archive | |
run: tar -czf site.tar.gz public/ | |
- name: Get current time | |
id: time | |
run: echo "timestamp=$(date +'%Y-%m-%d-%H-%M-%S')" >> $GITHUB_OUTPUT | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: release-${{ steps.time.outputs.timestamp }} | |
release_name: Release ${{ steps.time.outputs.timestamp }} | |
draft: false | |
prerelease: false | |
- name: 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: ./site.tar.gz | |
asset_name: site.tar.gz | |
asset_content_type: application/gzip |