Skip to content

Commit

Permalink
Add Sentry & Create Sentry Releases
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBoatyMcBoatFace committed Sep 13, 2023
1 parent 5e67bdf commit 15284d9
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 2 deletions.
78 changes: 77 additions & 1 deletion .github/workflows/deploy-ghost-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,84 @@ on:
- prod
- add_techchecks_page
jobs:
deploy:
versioning:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history and tags

- name: Generate Semantic Version
id: version
uses: PaulHatch/[email protected]
with:
tag_prefix: "v"
major_pattern: "(MAJOR)"
minor_pattern: "(MINOR)"
# Additional parms here...

- name: Print new version
run: echo "New version is ${{ steps.version.outputs.version }}"

- name: Configure Git user
run: |
git config user.name "${{ secrets.BOT_NAME }}"
git config user.email "${{ secrets.BOT_EMAIL }}"
- name: Tag the new version
run: |
git tag v${{ steps.version.outputs.version }}
git push origin v${{ steps.version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}

outputs:
version: ${{ steps.version.outputs.version }}

create-release:
needs: versioning
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Create Release
uses: ncipollo/[email protected]
with:
artifacts: "" # You can specify the artifacts to upload here
body: "Auto-generated release from v${{ needs.versioning.outputs.version }}"
name: "Release v${{ needs.versioning.outputs.version }}"
tag: "v${{ needs.versioning.outputs.version }}"
token: ${{ secrets.BOT_TOKEN }}

configure-sentry:
needs: create-release
name: Configure Sentry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
with:
environment: production

deploy-ghost:
runs-on: ubuntu-22.04
needs: configure-sentry
steps:
- uses: actions/checkout@v3
- name: Deploy Ghost Theme
Expand Down
9 changes: 8 additions & 1 deletion default.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

{{!-- Preload scripts --}}
<link rel="preload" as="style" href="{{asset "built/screen.css"}}" />
<link rel="preload" as="script" href="{{asset "built/casper.js"}}" />

{{!-- Sentry Monitoring --}}
<script
src="https://sentry.beltway.cloud/js-sdk-loader/a2c59658a75980de3ede52a9485ea0c5.min.js"
crossorigin="anonymous"
></script>


{{!-- Theme assets - use the {asset} helper to reference styles & scripts,
this will take care of caching and cache-busting automatically --}}
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}" />
Expand Down

0 comments on commit 15284d9

Please sign in to comment.