File tree 3 files changed +733918
-1
lines changed
3 files changed +733918
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy Spectrogram Website to GitHub Pages
2
+
3
+ on :
4
+ # Runs on pushes targeting the default branch
5
+ push :
6
+ branches : ["main", "spectrogram_website"]
7
+
8
+ # Allows you to run this workflow manually from the Actions tab
9
+ workflow_dispatch :
10
+
11
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12
+ permissions :
13
+ pages : write
14
+ id-token : write
15
+
16
+ jobs :
17
+ # Build Website
18
+ build :
19
+ runs-on : ubuntu-latest
20
+ defaults :
21
+ run :
22
+ shell : bash -l {0}
23
+ steps :
24
+ - name : Checkout
25
+ uses : actions/checkout@v4
26
+
27
+ - uses : actions/setup-python@v5
28
+ with :
29
+ python-version : ' 3.9.18'
30
+ cache : ' pip' # caching pip dependencies
31
+ cache-dependency-path : ambient_sound_analysis/requirements_noise.txt
32
+
33
+
34
+
35
+ - name : Install Python dependencies
36
+ run : |
37
+ pip install -r ambient_sound_analysis/requirements_noise.txt
38
+ pip install ipykernel
39
+ pip install nbconvert
40
+
41
+ - name : Install ffmpeg
42
+ run : |
43
+ sudo apt-get update
44
+ sudo apt-get install ffmpeg
45
+
46
+ - name : Build Website
47
+ shell : bash -el {0}
48
+ run : |
49
+ cd ambient_sound_analysis
50
+ jupyter nbconvert plot_noise_levels.ipynb --execute --to html --output-dir=_build/html --no-input
51
+
52
+ - name : Upload artifact
53
+ uses : actions/upload-pages-artifact@v3
54
+ with :
55
+ path : ambient_sound_analysis/_build/html
56
+
57
+
58
+ # Publish Website to GitHub Pages if built successfully
59
+ deploy :
60
+ needs : build
61
+ if : github.ref == 'refs/heads/spectrogram_website'
62
+ runs-on : ubuntu-latest
63
+ environment :
64
+ name : github-pages
65
+ url : ${{ steps.deployment.outputs.page_url }}
66
+
67
+ steps :
68
+ - name : Setup Pages
69
+ uses : actions/configure-pages@v5
70
+
71
+ - name : Deploy to GitHub Pages
72
+ id : deployment
73
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments