diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c6f380e..ea3bacb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,14 +1,17 @@ name: Dotfiles publisher -on: - push: - branches: - - master +on: [push] +# on: +# push: +# branches: +# - master jobs: publish-installer: - name: Publish install script + name: Publish setup script runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Publish to CDN + - env: + APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + name: Publish to CDN run: ./scripts/publish.sh diff --git a/README.md b/README.md index e4bd754..9214ef6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # dots.andrejus.dev -Collection of experimental dotfiles and supporting install scripts. +Collection of my dotfiles and supporting install scripts ## Install @@ -8,21 +8,24 @@ Collection of experimental dotfiles and supporting install scripts. ## Stack -### Shell -🐟 fish (+ fisher) +Tested and maintained against Debian buster -### Editor -neovim (+ vim-plug) +### Shells + +- 🐟 fish (+ fisher) + +### Editors + +- neovim (+ vim-plug) +- emacs ### Languages -- js (nvm, node, yarn) +- node.js (nvm, yarn) - python (pyenv, poetry) -- java ### Tools -- docker (+ docker-compose) +- docker - terraform - gcloud, firebase, awscli -- screenfetch diff --git a/files/home/.profile b/files/home/.profile index 26b7d07..a3dd31f 100644 --- a/files/home/.profile +++ b/files/home/.profile @@ -40,8 +40,13 @@ export PATH="$POETRY_ROOT/bin:$PATH" export NVM_DIR=${NVM_DIR:-"$HOME/.nvm"} mkdir -p "$NVM_DIR" export PATH="$NVM_DIR/bin:$PATH" -VERSION=`cat $NVM_DIR/alias/lts/fermium` # Default v14 -export PATH="$NVM_DIR/versions/node/$VERSION/bin:$PATH" + +# node (default v14) +node_alias="$NVM_DIR/alias/lts/fermium" +if [ -f "$node_alias" ]; then + VERSION=`cat $node_alias` + export PATH="$NVM_DIR/versions/node/$VERSION/bin:$PATH" +fi # yarn export YARN_DIR=${YARN_DIR:-"$HOME/.yarn"} diff --git a/terraform/module/main.tf b/terraform/module/main.tf index 9ef5acf..5a8cfee 100644 --- a/terraform/module/main.tf +++ b/terraform/module/main.tf @@ -14,6 +14,10 @@ resource "google_storage_bucket" "bucket" { depends_on = [google_project_service.storage] location = var.gcs_location + website { + main_page_suffix = "index.html" + not_found_page = "index.html" + } } resource "google_storage_default_object_access_control" "bucket_public" { @@ -22,6 +26,22 @@ resource "google_storage_default_object_access_control" "bucket_public" { entity = "allUsers" } +resource "google_storage_bucket_object" "index" { + name = "index.html" + source = "${path.module}/public/index.html" + bucket = google_storage_bucket.bucket.name +} + +resource "google_service_account" "uploader_sa" { + account_id = "${var.prefix}-uploader-sa" + display_name = "Uploader Service Account" +} + +resource "google_storage_default_object_access_control" "upload" { + bucket = google_storage_bucket.bucket.name + role = "OWNER" + entity = "user-${google_service_account.uploader_sa.email}" +} # ================================================================= # Expose bucket via HTTPS using Cloud CDN diff --git a/terraform/module/public/index.html b/terraform/module/public/index.html new file mode 100644 index 0000000..b64b87f --- /dev/null +++ b/terraform/module/public/index.html @@ -0,0 +1,24 @@ + + +
+Redirecting to GitHub repo...
+