Skip to content

Commit 0ae0c29

Browse files
committed
ci: Update ci.yml
1 parent a3e2d33 commit 0ae0c29

File tree

1 file changed

+12
-45
lines changed

1 file changed

+12
-45
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,15 @@ name: CI
22
on: [push, pull_request]
33
jobs:
44
build:
5-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
6-
runs-on: ubuntu-latest
7-
steps:
8-
- uses: actions/checkout@v3
9-
with:
10-
submodules: true
11-
- uses: actions/setup-python@v4
12-
with:
13-
python-version: 3.8
14-
cache: pip
15-
cache-dependency-path: '**/requirements*.txt'
16-
# Don't install editable projects in the current working directory.
17-
# https://pip.pypa.io/en/latest/reference/pip_install/#install-src
18-
- run: pip install --src $GITHUB_WORKSPACE/../src -r requirements.txt
19-
- if: github.repository == 'open-contracting/standard_profile_template'
20-
run: make update extract
21-
- run: make
22-
# Disable linkcheck as it is too slow for development.
23-
# - run: |
24-
# make linkcheck
25-
# rm -f output.json output.txt
26-
# Google Chrome and ChromeDriver are already included.
27-
# https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
28-
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
29-
- run: pytest -W error
30-
# Deploy the built documentation to the staging directory.
31-
- if: github.event_name == 'push'
32-
uses: shimataro/ssh-key-action@v2
33-
with:
34-
key: ${{ secrets.PRIVATE_KEY }}
35-
known_hosts: standard.open-contracting.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGveFGTJ9yyObNGDUCUyzyFkm6Kzh3YqIt1qB7B/KU6E
36-
- if: github.event_name == 'push'
37-
uses: bcomnes/netrc-creds@v2
38-
with:
39-
machine: standard.open-contracting.org
40-
login: manage
41-
password: ${{ secrets.ELASTICSEARCH_PASSWORD }}
42-
- if: github.event_name == 'push' && success() && github.repository != 'open-contracting/standard_profile_template'
43-
env:
44-
PATH_PREFIX: ""
45-
PRODUCTION: ${{ startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/latest' || github.ref == 'refs/heads/1.0' || github.ref == 'refs/heads/1.1' }}
46-
RELEASE: ${{ startsWith(github.ref, 'refs/tags') }}
47-
VERSION: "1.1"
48-
shell: bash
49-
run: curl -sS https://raw.githubusercontent.com/open-contracting/deploy/main/deploy-docs.sh | bash -
5+
uses: open-contracting/.github/.github/workflows/ci-profile.yml@main
6+
secrets:
7+
private-key: ${{ secrets.PRIVATE_KEY }}
8+
elasticsearch-password: ${{ secrets.ELASTICSEARCH_PASSWORD }}
9+
with:
10+
path-prefix: ''
11+
version: '1.1'
12+
production-refs: '["refs/heads/1.0", "refs/heads/1.1"]'
13+
# Linkcheck is slow for development.
14+
linkcheck: false
15+
# "ResourceWarning: unclosed file <_io.BufferedWriter name='/dev/null'>"
16+
pytest-options: -W ignore::ResourceWarning

0 commit comments

Comments
 (0)