-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.88 KB
/
package.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: dotnet package
on:
release:
types: [created]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
packages: write
jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.x' # SDK Version to use.
# source-url: https://nuget.pkg.github.com/<owner>/index.json
- name: Create the package
run: dotnet pack src/Stac.Api.Package/ -c Release --include-symbols -o publish
- name: Publish the package to Nuget
run: dotnet nuget push publish/*.nupkg -s https://www.nuget.org/api/v2/package -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
- name: Remove symbols
run: rm publish/*.symbols.nupkg
- name: Publish the package to GPR
run: dotnet nuget push publish/*.nupkg --no-symbols -s https://nuget.pkg.github.com/Terradue/index.json -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- run: pip install nbconvert
- name: Convert notebooks to Markdown
run: find docs/notebooks -type f -name "*.ipynb" -exec python -m nbconvert --to markdown {} \;
- name: Set proper snippet language
run: find docs/notebooks -type f -name "*.md" -exec sed -i 's/polyglot-notebook/csharp/g' {} \;
- uses: nikeee/[email protected]
name: Build Documentation
with:
args: docs/docfx.json
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs/_site
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: package
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2