Revert "REMOVE ME: call deploy on push"

Ben Kunkle created

This reverts commit 305b27738ef03438540c07301aa8f0f51aa79d92.

Change summary

.github/workflows/deploy_docs_nightly_pr.yml                | 23 ---
tooling/xtask/src/tasks/workflows.rs                        |  2 
tooling/xtask/src/tasks/workflows/deploy_docs_nightly_pr.rs | 46 -------
3 files changed, 71 deletions(-)

Detailed changes

.github/workflows/deploy_docs_nightly_pr.yml 🔗

@@ -1,23 +0,0 @@
-# Generated from xtask::workflows::deploy_docs_nightly_pr
-# Rebuild with `cargo xtask workflows`.
-name: deploy_docs_nightly_pr
-on:
-  push:
-    branches:
-    - staged-docs-releases
-jobs:
-  deploy_docs:
-    if: github.repository_owner == 'zed-industries'
-    permissions:
-      contents: read
-    uses: ./.github/workflows/deploy_docs.yml
-    secrets:
-      DOCS_AMPLITUDE_API_KEY: ${{ secrets.DOCS_AMPLITUDE_API_KEY }}
-      CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
-      CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
-    with:
-      channel: nightly
-      checkout_ref: ${{ github.sha }}
-defaults:
-  run:
-    shell: bash -euxo pipefail {0}

tooling/xtask/src/tasks/workflows.rs 🔗

@@ -15,7 +15,6 @@ mod compliance_check;
 mod danger;
 mod deploy_collab;
 mod deploy_docs;
-mod deploy_docs_nightly_pr;
 mod extension_auto_bump;
 mod extension_bump;
 mod extension_tests;
@@ -204,7 +203,6 @@ pub fn run_workflows(args: GenerateWorkflowArgs) -> Result<()> {
         WorkflowFile::zed(danger::danger),
         WorkflowFile::zed(deploy_collab::deploy_collab),
         WorkflowFile::zed(deploy_docs::deploy_docs),
-        WorkflowFile::zed(deploy_docs_nightly_pr::deploy_docs_nightly_pr),
         WorkflowFile::zed(extension_bump::extension_bump),
         WorkflowFile::zed(extension_auto_bump::extension_auto_bump),
         WorkflowFile::zed(extension_tests::extension_tests),

tooling/xtask/src/tasks/workflows/deploy_docs_nightly_pr.rs 🔗

@@ -1,46 +0,0 @@
-use gh_workflow::{Event, Expression, Input, Job, Level, Permissions, Push, UsesJob, Workflow};
-
-use crate::tasks::workflows::{
-    steps::{NamedJob, named},
-    vars,
-};
-
-const BRANCH_NAME: &str = "staged-docs-releases";
-
-pub(crate) fn deploy_docs_nightly_pr() -> Workflow {
-    let deploy_docs = deploy_docs();
-
-    named::workflow()
-        .add_event(Event::default().push(Push::default().add_branch(BRANCH_NAME)))
-        .add_job(deploy_docs.name, deploy_docs.job)
-}
-
-fn deploy_docs() -> NamedJob<UsesJob> {
-    let job = Job::default()
-        .cond(Expression::new(
-            "github.repository_owner == 'zed-industries'",
-        ))
-        .permissions(Permissions::default().contents(Level::Read))
-        .uses_local(".github/workflows/deploy_docs.yml")
-        .with(
-            Input::default()
-                .add("channel", "nightly")
-                .add("checkout_ref", "${{ github.sha }}"),
-        )
-        .secrets(indexmap::IndexMap::from([
-            (
-                "DOCS_AMPLITUDE_API_KEY".to_owned(),
-                vars::DOCS_AMPLITUDE_API_KEY.to_owned(),
-            ),
-            (
-                "CLOUDFLARE_API_TOKEN".to_owned(),
-                vars::CLOUDFLARE_API_TOKEN.to_owned(),
-            ),
-            (
-                "CLOUDFLARE_ACCOUNT_ID".to_owned(),
-                vars::CLOUDFLARE_ACCOUNT_ID.to_owned(),
-            ),
-        ]));
-
-    named::job(job)
-}