|
3 | 3 | push:
|
4 | 4 | branches:
|
5 | 5 | - main
|
| 6 | + workflow_dispatch: |
| 7 | + inputs: |
| 8 | + regenerate_all: |
| 9 | + description: "Force regeneration of every single package's API docs." |
| 10 | + required: false |
| 11 | + type: boolean |
| 12 | + default: false |
6 | 13 |
|
7 | 14 | jobs:
|
8 | 15 | deploy:
|
9 | 16 | name: Build and deploy
|
10 | 17 | runs-on: ubuntu-latest
|
11 |
| - container: swift:5.8 |
| 18 | + container: swiftlang/swift:nightly-5.9-jammy@sha256:a3c3ec5e4436c14e44759e38416bb0d46813dc6dd050e787ef3a80b2c3051a36 |
12 | 19 | steps:
|
13 | 20 | - name: Checkout
|
14 | 21 | uses: actions/checkout@v3
|
|
20 | 27 | curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
21 | 28 | unzip awscliv2.zip
|
22 | 29 | ./aws/install
|
| 30 | + - name: Regenerate all API docs if requested |
| 31 | + if: inputs.regenerate_all |
| 32 | + shell: bash |
| 33 | + run: | |
| 34 | + curl -sL \ |
| 35 | + https://raw.githubusercontent.com/vapor/api-docs/main/generate-package-api-docs.swift -o generate-package-api-docs.swift \ |
| 36 | + https://raw.githubusercontent.com/vapor/api-docs/main/theme-settings.json -o theme-settings.json |
| 37 | + for item in \ |
| 38 | + vapor:Vapor vapor:XCTVapor \ |
| 39 | + async-kit:AsyncKit routing-kit:RoutingKit console-kit:ConsoleKit \ |
| 40 | + websocket-kit:WebSocketKit multipart-kit:MultipartKit \ |
| 41 | + postgres-nio:PostgresNIO mysql-nio:MySQLNIO sqlite-nio:SQLiteNIO sql-kit:SQLKit \ |
| 42 | + postgres-kit:PostgresKit mysql-kit:MySQLKit sqlite-kit:SQLiteKit fluent-kit:FluentKit \ |
| 43 | + fluent-kit:FluentSQL fluent-kit:XCTFluent fluent:Fluent fluent-postgres-driver:FluentPostgresDriver \ |
| 44 | + fluent-mongo-driver:FluentMongoDriver fluent-mysql-driver:FluentMySQLDriver fluent-sqlite-driver:FluentSQLiteDriver \ |
| 45 | + redis:Redis queues-redis-driver:QueuesRedisDriver queues:Queues queues:XCTQueues \ |
| 46 | + leaf-kit:LeafKit leaf:Leaf \ |
| 47 | + jwt-kit:JWTKit jwt:JWT apns:APNS \ |
| 48 | + do |
| 49 | + repo=${item%:*} module=${item#*:} |
| 50 | + if [[ ! -d ${repo} ]]; then |
| 51 | + git clone https://github.com/vapor/${repo}.git ${repo} |
| 52 | + fi |
| 53 | + cp theme-settings.json ${repo} |
| 54 | + (cd ${repo} && swift ../generate-package-api-docs.swift ${repo} ${module}) |
| 55 | + cp -r ${repo}/public/* ./public |
| 56 | + done |
23 | 57 | - name: Configure AWS Credentials
|
24 | 58 | uses: aws-actions/configure-aws-credentials@v2
|
25 | 59 | with:
|
|
0 commit comments