|
20 | 20 | echo "COMMIT_MESSAGE=$(git log -1 --pretty=format:'%s')" >> "$GITHUB_ENV" |
21 | 21 | - id: skip |
22 | 22 | name: Skip if automated push |
23 | | - if: contains(env.COMMIT_MESSAGE, 'Apply automatic changes') |
| 23 | + if: startsWith(env.COMMIT_MESSAGE, 'GitHub Action') |
24 | 24 | run: | |
25 | 25 | echo "Automated commit detected - skipping job" |
26 | 26 | echo "skip_job=true" >> "$GITHUB_OUTPUT" |
|
67 | 67 | working-directory: ./main/generator |
68 | 68 | run: ./gradlew generateR |
69 | 69 |
|
70 | | - - name: Install system dependencies |
71 | | - run: | |
72 | | - sudo apt-get update |
73 | | - sudo apt-get install -y build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev |
74 | | -
|
75 | | - - name: Set up R |
76 | | - uses: r-lib/actions/setup-r@v2 |
77 | | - |
78 | | - - name: Install dependencies |
79 | | - working-directory: main/pkg |
80 | | - run: | |
81 | | - Rscript -e "install.packages(c('usethis', 'pkgdown', 'rcmdcheck', 'rversions', 'urlchecker', 'devtools'), repos = 'https://cloud.r-project.org')" |
82 | | - Rscript -e "devtools::install_deps(dependencies = TRUE)" |
83 | | -
|
84 | | - - name: Document R package |
85 | | - working-directory: main/pkg |
86 | | - run: Rscript -e "devtools::document()" |
87 | | - |
88 | | - - uses: r-lib/actions/setup-pandoc@v2 |
89 | | - |
90 | | - - uses: r-lib/actions/setup-r-dependencies@v2 |
91 | | - with: |
92 | | - extra-packages: any::pkgdown, local::. |
93 | | - needs: website |
94 | | - working-directory: main/pkg |
95 | | - |
96 | | - - name: Build site |
97 | | - run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) |
98 | | - shell: Rscript {0} |
99 | | - working-directory: main/pkg |
100 | 70 | - if: needs.check.outputs.skip_commit == 'false' |
101 | 71 | uses: stefanzweifel/git-auto-commit-action@v5 |
102 | 72 | with: |
103 | 73 | repository: main |
104 | | - commit_message: Apply automatic changes |
| 74 | + commit_message: GitHub Action - Generate R files from JSON Schema |
105 | 75 | file_pattern: main/** |
106 | | - - name: Deploy to GitHub pages 🚀 |
107 | | - if: github.event_name != 'pull_request' |
108 | | - uses: JamesIves/github-pages-deploy-action@v4.5.0 |
109 | | - with: |
110 | | - clean: false |
111 | | - branch: gh-pages |
112 | | - folder: pkg/docs |
113 | | - |
114 | | - |
0 commit comments