From c44174cf6007d8e93a33ac349f4aa6bf8b6f0152 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 17:52:13 +0000 Subject: [PATCH 1/5] Initial plan From 9016086f3ea9aaad2450b3a961653d2f2b7566a3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 17:55:39 +0000 Subject: [PATCH 2/5] Add GitHub Actions workflow for automated version incrementing and deployment tagging Co-authored-by: ckenst <6896787+ckenst@users.noreply.github.com> --- .github/workflows/deploy.yml | 82 ++++++++++++++++++++++++++++++++++++ ROADMAP.md | 4 +- 2 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..2eee4612 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,82 @@ +name: Deploy to GitHub Pages with Version Increment + +on: + push: + branches: + - main + +permissions: + contents: write + pages: write + id-token: write + +# Allow only one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + + - name: Read and Increment Version + id: version + run: | + # Read current version + CURRENT_VERSION=$(cat _includes/VERSION.txt) + echo "Current version: $CURRENT_VERSION" + + # Increment version + NEW_VERSION=$((CURRENT_VERSION + 1)) + echo "New version: $NEW_VERSION" + + # Write new version + echo "$NEW_VERSION" > _includes/VERSION.txt + + # Set output for later steps + echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.1' + bundler-cache: true + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Build with Jekyll + run: bundle exec jekyll build + env: + JEKYLL_ENV: production + + - name: Commit Version File + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add _includes/VERSION.txt + git commit -m "chore: bump version to ${{ steps.version.outputs.version }}" || echo "No changes to commit" + git push + + - name: Create Git Tag + run: | + git tag -a "v${{ steps.version.outputs.version }}" -m "Release version ${{ steps.version.outputs.version }}" + git push origin "v${{ steps.version.outputs.version }}" + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./_site + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/ROADMAP.md b/ROADMAP.md index fd16f0c7..b125f6c0 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -10,8 +10,8 @@ Continue to use TCorg to experiment and learn. I want to track quality metrics a - [x] **Implement `VERSION` file**: Create a plaintext file in the root directory to track SemVer (e.g., `1.0.0`). - [x] **Footer Integration**: Update the website footer to dynamically display the current string from the `VERSION` file. -- [ ] **Automated Increments**: Create a workflow to increment the `VERSION` file on every deployment. -- [ ] **Deployment Tagging**: Ensure every production deploy is tagged in Git to match the internal version. +- [x] **Automated Increments**: Create a workflow to increment the `VERSION` file on every deployment. +- [x] **Deployment Tagging**: Ensure every production deploy is tagged in Git to match the internal version. ## Phase 2: Quality Ledger & Metrics *Goal: Associate every site version with a specific quality snapshot.* From 4a4804ea0646053d4ae921adc1348c7098137f3f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 17:56:49 +0000 Subject: [PATCH 3/5] Fix VERSION.txt format to preserve no trailing newline Co-authored-by: ckenst <6896787+ckenst@users.noreply.github.com> --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2eee4612..63f7012f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -39,8 +39,8 @@ jobs: NEW_VERSION=$((CURRENT_VERSION + 1)) echo "New version: $NEW_VERSION" - # Write new version - echo "$NEW_VERSION" > _includes/VERSION.txt + # Write new version (without trailing newline to match original format) + echo -n "$NEW_VERSION" > _includes/VERSION.txt # Set output for later steps echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT From 4d5ca626bd4803383be300f591ed409b9d54129e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 17:57:42 +0000 Subject: [PATCH 4/5] Add versioning and deployment documentation to README Co-authored-by: ckenst <6896787+ckenst@users.noreply.github.com> --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 9ee43854..1a59bf23 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,20 @@ A good _heuristic_ for whether a conference should be included is if its name in Don't forget to **[sign up](http://eepurl.com/c4paYT)** for our once **monthly newsletter.** +## Versioning and Deployments + +The site uses an automated versioning system to track each deployment: + +- **Version Number**: Every deployment to production automatically increments the version number stored in `_includes/VERSION.txt` +- **Git Tags**: Each deployment is tagged in Git with the format `vXXXX` (e.g., `v1501`) +- **Footer Display**: The current version is displayed in the site footer as `rev.XXXX.` +- **Workflow**: The `.github/workflows/deploy.yml` workflow handles version incrementing, tagging, and deployment on every push to `main` + +This versioning system enables: +- Tracking which version of the site is deployed +- Associating bug reports with specific deployments +- Measuring quality metrics across versions (see [ROADMAP.md](ROADMAP.md)) + ## License From efe0640ba151f6e5c8eab15b5cbf6946217354e6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 17:59:00 +0000 Subject: [PATCH 5/5] Add error handling and race condition protection to deployment workflow Co-authored-by: ckenst <6896787+ckenst@users.noreply.github.com> --- .github/workflows/deploy.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 63f7012f..caedcd00 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,6 +31,12 @@ jobs: - name: Read and Increment Version id: version run: | + # Check if VERSION.txt exists + if [ ! -f _includes/VERSION.txt ]; then + echo "ERROR: _includes/VERSION.txt not found" + exit 1 + fi + # Read current version CURRENT_VERSION=$(cat _includes/VERSION.txt) echo "Current version: $CURRENT_VERSION" @@ -64,13 +70,24 @@ jobs: git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add _includes/VERSION.txt - git commit -m "chore: bump version to ${{ steps.version.outputs.version }}" || echo "No changes to commit" - git push + + # Only commit and push if there are changes + if git diff --staged --quiet; then + echo "No changes to commit" + else + git commit -m "chore: bump version to ${{ steps.version.outputs.version }}" + git push + fi - name: Create Git Tag run: | - git tag -a "v${{ steps.version.outputs.version }}" -m "Release version ${{ steps.version.outputs.version }}" - git push origin "v${{ steps.version.outputs.version }}" + # Check if tag already exists (could happen with concurrent runs) + if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then + echo "Tag v${{ steps.version.outputs.version }} already exists, skipping tag creation" + else + git tag -a "v${{ steps.version.outputs.version }}" -m "Release version ${{ steps.version.outputs.version }}" + git push origin "v${{ steps.version.outputs.version }}" + fi - name: Upload artifact uses: actions/upload-pages-artifact@v3