From 5146d3da4abbde1a9d2bf8f22595029f0bdc2966 Mon Sep 17 00:00:00 2001 From: Lingyong Sun Date: Tue, 21 Jan 2025 21:57:28 +0100 Subject: [PATCH 1/4] LYS-24 add gh-pages domain configuration --- pulumi/index.ts | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/pulumi/index.ts b/pulumi/index.ts index cf3b392..c49966c 100644 --- a/pulumi/index.ts +++ b/pulumi/index.ts @@ -1,8 +1,37 @@ import { BucketV2 } from "@pulumi/aws/s3"; - +import {getZone, Record, RecordType} from "@pulumi/aws/route53"; +import { Config } from "@pulumi/pulumi"; +const config = new Config('photos') // create photo repositories // flickr const flickrRepo = new BucketV2("my-flickr-repo"); +const lysz210Zone = getZone({ + name: "lysz210.name" +}) + +const ghPagesVerificationRecord = new Record("ghPagesVerificationRecord", { + zoneId: lysz210Zone.then(zone => zone.zoneId), + type: RecordType.TXT, + name: config.requireSecret("ghVerificationHostname"), + records: [config.requireSecret("ghVerificationValue")], + ttl: 300 +}); + +const ghPagesPointerRecord = new Record("ghPagesPointerRecord", { + zoneId: lysz210Zone.then(zone => zone.zoneId), + type: RecordType.A, + name: 'photos.gh.lysz210.name', + records: [ + '185.199.108.153', + '185.199.109.153', + '185.199.110.153', + '185.199.111.153', + ], + ttl: 300 +}) + // Export the name of the bucket export const flickrRepoId = flickrRepo.id; +export const ghPagesVerification = ghPagesVerificationRecord.name +export const ghPagesPointer = ghPagesPointerRecord.name \ No newline at end of file From c2e3b715bf78a25d0b9291d4aac4ed45e3514585 Mon Sep 17 00:00:00 2001 From: Lingyong Sun Date: Tue, 21 Jan 2025 22:03:03 +0100 Subject: [PATCH 2/4] LYS-24 add gh-pages domain configuration --- .github/workflows/deploy.yaml | 118 +++++++++++++++++----------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 7a50753..62332e4 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -3,14 +3,14 @@ name: Deploy photos on: push: branches: - - master + - LYS-24-verifica-dominio-photos.gh.lysz210.name-per-gh-pages jobs: - tests: - uses: ./.github/workflows/test.yaml +# tests: +# uses: ./.github/workflows/test.yaml deploy: - needs: - - tests +# needs: +# - tests runs-on: ${{ matrix.os }} strategy: matrix: @@ -33,57 +33,57 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_REGION: ${{ secrets.AWS_REGION }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - docs: - needs: - - tests - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ ubuntu-latest ] - node: [ 22 ] - steps: - - uses: actions/checkout@v4 - - name: Install dependencies - run: npm ci - - name: Generate documentations - run: npm run docs - - name: Upload documentation to artifact - uses: actions/upload-artifact@v4 - with: - name: docs - path: .reports/docs - if-no-files-found: error - pages: - needs: - - tests - - docs - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ ubuntu-latest ] - node: [ 22 ] - steps: - - name: Download docs - uses: actions/download-artifact@v4 - with: - name: docs - - name: Download bdd tests reports - uses: actions/download-artifact@v4 - with: - name: bdd - path: bdd - - name: Download unit tests reports - uses: actions/download-artifact@v4 - with: - name: unit - path: unit - - name: Download code coverage reports - uses: actions/download-artifact@v4 - with: - name: coverage - path: coverage - - name: Deploy pages - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./ \ No newline at end of file +# docs: +# needs: +# - tests +# runs-on: ${{ matrix.os }} +# strategy: +# matrix: +# os: [ ubuntu-latest ] +# node: [ 22 ] +# steps: +# - uses: actions/checkout@v4 +# - name: Install dependencies +# run: npm ci +# - name: Generate documentations +# run: npm run docs +# - name: Upload documentation to artifact +# uses: actions/upload-artifact@v4 +# with: +# name: docs +# path: .reports/docs +# if-no-files-found: error +# pages: +# needs: +# - tests +# - docs +# runs-on: ${{ matrix.os }} +# strategy: +# matrix: +# os: [ ubuntu-latest ] +# node: [ 22 ] +# steps: +# - name: Download docs +# uses: actions/download-artifact@v4 +# with: +# name: docs +# - name: Download bdd tests reports +# uses: actions/download-artifact@v4 +# with: +# name: bdd +# path: bdd +# - name: Download unit tests reports +# uses: actions/download-artifact@v4 +# with: +# name: unit +# path: unit +# - name: Download code coverage reports +# uses: actions/download-artifact@v4 +# with: +# name: coverage +# path: coverage +# - name: Deploy pages +# uses: peaceiris/actions-gh-pages@v4 +# with: +# github_token: ${{ secrets.GITHUB_TOKEN }} +# publish_dir: ./ \ No newline at end of file From 8cf800efa37016c1a4655bcf7c285e349535dc97 Mon Sep 17 00:00:00 2001 From: Lingyong Sun Date: Tue, 21 Jan 2025 22:12:58 +0100 Subject: [PATCH 3/4] LYS-24 add gh-pages domain configuration --- pulumi/Pulumi.dev.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 pulumi/Pulumi.dev.yaml diff --git a/pulumi/Pulumi.dev.yaml b/pulumi/Pulumi.dev.yaml new file mode 100644 index 0000000..c7f7aa6 --- /dev/null +++ b/pulumi/Pulumi.dev.yaml @@ -0,0 +1,6 @@ +config: + aws:region: eu-south-1 + photos:ghVerificationHostname: + secure: AAABAK4RBLkQScF98pRH/igUwsn9CEq+WEt6XgXEksJQ1GRx3k4pUwNn51Vk5evY4BY9hoW3kgd5rQjdi6rw1GrVMYbgFmVuS68s7T3BZC8Dbh4m0b0= + photos:ghVerificationValue: + secure: AAABAPrBerjeJAZroYO5rbn8YUTNsOy67pKggiYN2cxb3on9gCBg3ba19/ywaZAa/bz2T1TI4/rh02gPVnc= From bd026f34ded269936a413487f5edf3c484288db5 Mon Sep 17 00:00:00 2001 From: Lingyong Sun Date: Tue, 21 Jan 2025 22:15:32 +0100 Subject: [PATCH 4/4] LYS-24 add gh-pages domain configuration --- .github/workflows/deploy.yaml | 118 +++++++++++++++++----------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 62332e4..7a50753 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -3,14 +3,14 @@ name: Deploy photos on: push: branches: - - LYS-24-verifica-dominio-photos.gh.lysz210.name-per-gh-pages + - master jobs: -# tests: -# uses: ./.github/workflows/test.yaml + tests: + uses: ./.github/workflows/test.yaml deploy: -# needs: -# - tests + needs: + - tests runs-on: ${{ matrix.os }} strategy: matrix: @@ -33,57 +33,57 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_REGION: ${{ secrets.AWS_REGION }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} -# docs: -# needs: -# - tests -# runs-on: ${{ matrix.os }} -# strategy: -# matrix: -# os: [ ubuntu-latest ] -# node: [ 22 ] -# steps: -# - uses: actions/checkout@v4 -# - name: Install dependencies -# run: npm ci -# - name: Generate documentations -# run: npm run docs -# - name: Upload documentation to artifact -# uses: actions/upload-artifact@v4 -# with: -# name: docs -# path: .reports/docs -# if-no-files-found: error -# pages: -# needs: -# - tests -# - docs -# runs-on: ${{ matrix.os }} -# strategy: -# matrix: -# os: [ ubuntu-latest ] -# node: [ 22 ] -# steps: -# - name: Download docs -# uses: actions/download-artifact@v4 -# with: -# name: docs -# - name: Download bdd tests reports -# uses: actions/download-artifact@v4 -# with: -# name: bdd -# path: bdd -# - name: Download unit tests reports -# uses: actions/download-artifact@v4 -# with: -# name: unit -# path: unit -# - name: Download code coverage reports -# uses: actions/download-artifact@v4 -# with: -# name: coverage -# path: coverage -# - name: Deploy pages -# uses: peaceiris/actions-gh-pages@v4 -# with: -# github_token: ${{ secrets.GITHUB_TOKEN }} -# publish_dir: ./ \ No newline at end of file + docs: + needs: + - tests + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest ] + node: [ 22 ] + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: npm ci + - name: Generate documentations + run: npm run docs + - name: Upload documentation to artifact + uses: actions/upload-artifact@v4 + with: + name: docs + path: .reports/docs + if-no-files-found: error + pages: + needs: + - tests + - docs + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest ] + node: [ 22 ] + steps: + - name: Download docs + uses: actions/download-artifact@v4 + with: + name: docs + - name: Download bdd tests reports + uses: actions/download-artifact@v4 + with: + name: bdd + path: bdd + - name: Download unit tests reports + uses: actions/download-artifact@v4 + with: + name: unit + path: unit + - name: Download code coverage reports + uses: actions/download-artifact@v4 + with: + name: coverage + path: coverage + - name: Deploy pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./ \ No newline at end of file