Skip to content

Commit

Permalink
feat: add hex publish docs github action (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
yordis authored Nov 12, 2024
1 parent d65062a commit 43097ee
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
5 changes: 3 additions & 2 deletions templates/.github/workflows/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:
concurrency:
group: Production

jobs:
{{#if IS_MIX_PACKAGE}}
jobs:
Hex:
runs-on: ubuntu-latest

Expand All @@ -33,5 +33,6 @@ jobs:
run: mix hex.publish --yes
env:
HEX_API_KEY: $\{{ secrets.HEX_API_KEY }}

{{else}}
jobs: {}
{{/if}}
32 changes: 32 additions & 0 deletions templates/.github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This file is synced with beam-community/common-config. Any changes will be overwritten.

name: Publish Docs

on:
workflow_dispatch:

concurrency:
group: hex-publish-docs
cancel-in-progress: true

{{#if IS_MIX_PACKAGE}}
jobs:
Hex:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Elixir
uses: stordco/actions-elixir/setup@v1
with:
github-token: $\{{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

- name: Publish Docs
run: mix hex.publish docs --yes
env:
HEX_API_KEY: $\{{ secrets.HEX_API_KEY }}
{{else}}
jobs: {}
{{/if}}

0 comments on commit 43097ee

Please sign in to comment.