diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 268ca51b..00000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: CI -on: [pull_request] - -env: - JSONNET_VERSION: '0.20.0' - JSONNET_BUNDLER_VERSION: '0.5.1' - -jobs: - tests: - name: Tests - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Setup PATH - shell: bash - run: | - mkdir -p "$HOME/.local/bin" - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Install jsonnet - shell: bash - run: | - wget https://github.com/google/go-jsonnet/releases/download/v${JSONNET_VERSION}/go-jsonnet_${JSONNET_VERSION}_Linux_x86_64.tar.gz - tar --extract --file=go-jsonnet_0.20.0_Linux_x86_64.tar.gz jsonnet - mv jsonnet "$HOME/.local/bin" - chmod u+x "$HOME/.local/bin/jsonnet" - - - name: Install jsonnet-bundler - shell: bash - run: | - wget https://github.com/jsonnet-bundler/jsonnet-bundler/releases/download/v${JSONNET_BUNDLER_VERSION}/jb-linux-amd64 - mv jb-linux-amd64 "$HOME/.local/bin/jb" - chmod u+x "$HOME/.local/bin/jb" - - - name: Tests - run: make test diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index f9dda52d..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,19 +0,0 @@ -"jobs": - "build": - "name": "Deploy docs" - "runs-on": "ubuntu-latest" - "steps": - - "name": "Checkout main" - "uses": "actions/checkout@v2" - "with": - "fetch-depth": 0 - - "uses": "actions/setup-python@v2" - - "run": "pip install -r .mkdocs/requirements.txt" - - "run": "git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'" - - "name": "Publish docs" - "run": "mkdocs gh-deploy --force -f .mkdocs/mkdocs.yml" -"name": "Publish docs via GitHub Pages" -"on": - "push": - "branches": - - "main" diff --git a/.github/workflows/publish-docs.yaml b/.github/workflows/publish-docs.yaml new file mode 100644 index 00000000..30edeb95 --- /dev/null +++ b/.github/workflows/publish-docs.yaml @@ -0,0 +1,24 @@ +name: Publish docs via GitHub Pages +on: + push: + branches: + - main + +jobs: + publish-docs: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v5 + + - name: Install dependencies + run: pip install -r .mkdocs/requirements.txt + + - run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com' + + - name: Publish docs + run: mkdocs gh-deploy --force -f .mkdocs/mkdocs.yml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 00000000..6c0bf753 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,27 @@ +name: Tests +on: + pull_request: + +env: + JSONNET_VERSION: "0.20.0" + JSONNET_BUNDLER_VERSION: "0.5.1" + +jobs: + tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install jsonnet + run: | + wget -qO- https://github.com/google/go-jsonnet/releases/download/v${JSONNET_VERSION}/go-jsonnet_${JSONNET_VERSION}_Linux_x86_64.tar.gz \ + | tar -xvz --one-top-level=$HOME/.local/bin + + - name: Install jsonnet-bundler + run: | + wget -qO "$HOME/.local/bin/jb" https://github.com/jsonnet-bundler/jsonnet-bundler/releases/download/v${JSONNET_BUNDLER_VERSION}/jb-linux-amd64 + chmod u+x "$HOME/.local/bin/jb" + + - name: Run tests + run: make test