From 1c63ae9068abe9077e2bc6040a17f846c480a525 Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Fri, 23 Jan 2026 04:47:38 +0100 Subject: [PATCH 1/2] Add continuous deployment for lexicon when merged to main --- .github/workflows/cd.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..02b087e --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,48 @@ +name: Deploy lexicon + +on: + push: + branches: [main] + paths: + - "lexicons/**" + - ".github/workflows/cd.yml" + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Install goat + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release download --repo bluesky-social/goat --pattern 'goat_Linux_x86_64.tar.gz' --output 'goat.tar.gz' + tar -xzf goat.tar.gz --directory /usr/local/bin + chmod +x /usr/local/bin/goat + + - name: Print goat version + continue-on-error: false + run: goat -v + + - name: authenticate goat + env: + USERNAME: ${{ vars.USERNAME }} + PASSWORD: ${{ secrets.APP_PASSWORD }} + run: goat account login -u $USERNAME -p $PASSWORD + + - name: Check authentication for Goat + run: goat account check-auth + + - name: Publish lexicon update + run: goat lex publish -u From 2855c878de75c5dbc022789d73c7ce944e32598c Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Fri, 23 Jan 2026 19:31:25 +0100 Subject: [PATCH 2/2] Add logout from goat into CD workflow --- .github/workflows/cd.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 02b087e..e4d6614 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -35,7 +35,7 @@ jobs: continue-on-error: false run: goat -v - - name: authenticate goat + - name: Login to goat env: USERNAME: ${{ vars.USERNAME }} PASSWORD: ${{ secrets.APP_PASSWORD }} @@ -46,3 +46,8 @@ jobs: - name: Publish lexicon update run: goat lex publish -u + + # We always want to attempt to logout of goat. + - name: Logout of goat + if: success() || failure() + run: goat account logout